The "hosts file" is a common tool in operating systems to map names to IP addresses. These mappings usually take precedence over the DNS system.

learn more… | top users | synonyms

1
vote
1answer
58 views

Tracking down edits to my /etc/hosts file

Every hour at :49, my hosts file is being replaced with the following: # Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file ...
0
votes
1answer
21 views

accessing remote server with name instead of ip address and port number

I have question regarding accessing my web application with some name,which is deployed on remote server. Currently, I using following URL http://160.110.67.181:8080/myapp So, I'm wondering ...
0
votes
2answers
15 views

Editing the OS X hosts file with a one-time password

I was wondering if there was a way to edit the host file using a "throwaway" password. I want to prevent myself from entering certain websites, but OS X doesn't not have a good alternative for Cold ...
0
votes
1answer
14 views

Windows - make hosts file affect ICS

I am running an Ad Hoc Wi-Fi network (Hosted network using Microsoft Virtual WiFi Miniport Adapter) on my PC. I used ICS (Internet Connection Sharing) to link my existing Wi-Fi connection through to ...
0
votes
3answers
31 views

What is writing to my hosts file?

I've got an odd situation where I'm emptying out my hosts file but when I ping something that used to have an entry in the hosts file the hosts file gets populated with the entries that I've just ...
1
vote
1answer
29 views

Local Network web site access with multiple computers

I have a local site running through my server computer located at 192.168.2.111 (port 80) on my network. I'm currently running the site using XAMPP. In order for the site to be accessed, I have ...
0
votes
2answers
37 views

Editing /etc/hosts to use domain name instead of ip address

I have a web service running at http://192.168.1.2:5000/, I want to replace it with a typical domain name, in /etc/hosts, I'm doing something like 192.168.1.2:500 http://www.mydomainname.com but, ...
0
votes
1answer
26 views

How to add/remove lines from the hosts file

I'd like to add and remove hosts file entries at a regular interval. I believe the easiest way to do this is powershell and task scheduler. So how do you add/remove hosts file entries?
2
votes
2answers
74 views

Why is Chromium bypassing /etc/hosts and dnsmasq?

I'm using hostsblock together with dnsmasq on Arch Linux to block some websites, one of them is facebook.com and www.facebook.com. I know everything is working properly because a simple ping to ...
0
votes
1answer
41 views

Sinkhole Planning

I am currently planning on setting a network sinkhole in my... network. I have a list of sites that I want to block, around 300k of them. What is the recommended way to do this. My computer is its own ...
0
votes
0answers
28 views

redirect from one site to another

To avoid spending time on the internet I decidet to block several time wasting web sites I added rule redirecting several pages to localhost changine file C:\Windows\System32\drivers\etc\hosts I ...
1
vote
3answers
154 views

Easy way to view a website at a different IP than associated with hostname?

Some background — WordPress is really annoying in terms of what hostname you access it from, which makes creating testing environments rather painful (That is, I could create a subdomain for staging, ...
0
votes
0answers
53 views

Changing hosts file in Mac OS X does not take effect

I have tried to alter the hosts file adding my own entries to access sites that are being blocked by my ISP. When address the entries as follows 194.71.107.82 totallylegalsite.se After adding ...
0
votes
3answers
329 views

Why does localhost not work in Windows 8.1, but 127.0.0.1 does?

I have a HTTP server running on port 9876. I put http://127.0.0.1:9876/ into Chrome and the page loads instantly. I put http://localhost:9876/ into Chrome and the page never loads. I have never ...
0
votes
2answers
64 views

My Mac is not responding for this own IP, but it's ok for everything else

My Mac has the IP 192.168.1.123 and this network settings: IP: 192.168.1.123 Net Mask: 255.255.255.0 Router: 192.168.1.3 DNS: 208.67.222.222, 8.8.8.8 and apache answer correctly if I request ...
0
votes
1answer
53 views

DHCP fallback based on /etc/hosts lookup of your hostname

I have a Kubuntu box (12.04) which usually gets its IP via DHCP. However, it also has a hosts file with some entries in case the DHCP+DNS server fails. Now, if there is no DHCP available, I want the ...
0
votes
1answer
48 views

With a hosts file Chrome takes too long to realize that 0.0.0.0 isn't real

So i have a hosts file with many links set to 0.0.0.0, and a lot of times when i go to websites, Chrome is taking too long "waiting for googlesyndication.com" (ad sites that i put in the hosts file) ...
0
votes
1answer
70 views

How to make local DNS for pointing domain *.local to localhost?

I'm developing websites and I use xampp which is configured to automaticly point some type of domains to xampp main directory. For example: When I go to site1.local xampp is displaying page located at ...
2
votes
2answers
155 views

Which leads to faster browsing, an ad blocker or an edited hosts file?

I recently came across the MVPS hosts file and became fascinated with the concept of blocking ads upstream from your browser. I don't know much about how quickly adblockers work, nor how quickly the ...
1
vote
1answer
87 views

port number in acrylic dns proxy hosts file

I want to map a url as follows: 127.0.0.1:8080 *.devserver.com but windows host file neither support port number nor wildcards.So I am using acrylic dns proxy which supports wildcard.So following ...
-1
votes
1answer
66 views

When editing hosts file with vi , the added line gets repeated ad infinitum

Sometimes when I edit the hosts file by adding a new line, and when I do Esc, :, W, Q to save and exit, that line gets repeated infinite times in the file, and then gets saved. What am I doing wrong? ...
0
votes
0answers
53 views

How to expose a IIS website outside the domain

I have been programming remotely over VPN on my dev machine which is running Windows server 2003. My dev website is hosted on IIS 6 and can be accessed internally within the domain like ...
0
votes
0answers
62 views

Hosts file keeps being ignored in Windows 7

Something keeps happening to my hosts file (%SystemRoot%\System32\drivers\etc) which means that Windows 7 ignores it. I use it as part of the process of creating Virtual Hosts for WAMP e.g. ...
1
vote
1answer
240 views

Windows 7 hosts file per application

Is it possible to use the hosts file (C:\Windows\System32\drivers\etc\hosts) on a "per-application" level? For example, I added this entry to the hosts file: #Override NAS 192.168.1.3 NAS Now NAS ...
1
vote
0answers
3k views

windows 8.1 update disabled local website for IE

I use the Windows hosts file to resolve domains for websites on my local IIS. It worked great under Windows 8. I just updated to Windows 8.1 and none of my local sites will resolve in IE11. Even ...
1
vote
0answers
36 views

HOSTS mapping not working as expected

I'm running a local Webmatrix configuration which uses IISExpress as webserver. For convenience's sake, I have configured my remote development setup (http://godrul1.gopagoda.com/) to ...
0
votes
0answers
124 views

How to create internal host names on a LAN for intranet?

I'm using Verizon FIOS. On the LAN there is an Intranet. We have internal host names such as fred, barney, etc. The way I have been doing it so far is to update each computer's /etc/hosts table to map ...
0
votes
0answers
48 views

Custom Hosts file entry resolves in browser but not when pinged

I have a hosts entry to redirect app-dev/ to my application server. This resolves correctly in the browser but when I try to ping app-dev/ or ssh into it, neither can resolve the name then. The only ...
0
votes
1answer
76 views

Windows Hosts file Entry for Dev Server

I have an ip address that I don't want to assign to my domain just yet while it is being developed. However I would like a way for my clients to access the site other than typing in the address. I ...
0
votes
0answers
135 views

What's causing this site to redirect to my localhost?

[x-post SO] yoast.com is redirected to my localhost server. I've only mapped localhost to gomlm.gopagoda.com in my HOSTS file, so that I can work on my localhost version without changing the ...
0
votes
1answer
52 views

How does a machine determine its host name?

Below is the output of the hostname command. bash-3.2$ hostname server1 How does the hostname command determine the hostname to be server1? I guess it checks with the DNS server as this is ...
1
vote
0answers
28 views

Hosts file, but for directories

I know you can use the hosts file to redirect requests from a certain domain to a different domain (adding 127.0.0.1 google.com would make all requests from google.com instead go to 127.0.0.1). I want ...
0
votes
2answers
53 views

Slow saving changes to host file?

All of a sudden it takes a while (a second or two) to save changes to my Win7 box's host file. It used to be instantaneous. I've tried editing it with gVim and Notepad++. Saving a file with ...
0
votes
0answers
287 views

Prevent McAfee Security Scan Plus from installing - ever

Whenever Flash updates, some colleague or friend keeps pressing OK, and without noticing, McAfee Security Scan Plus is installed (and it happened to me several times as well). Then, after a while, a ...
-1
votes
1answer
47 views

Add 'www' entry to /etc/hosts

Using Windows and JetBrains IDEA; and trying to serve a hard coded .zip file for scala, since IDEA's plugin is hard-coded to a non-existent location on scala-lang.org. So I've added: 127.0.0.1 ...
0
votes
1answer
215 views

Adding dyndns hostname to /etc/hosts with Alias

I configued my router to work with dyndns. Instead of using the dyndns hostname created by dyndns.org, I want to define my own host name, that in tern, refers to that dyndns hostname. For example, ...
1
vote
1answer
97 views

localhost:3000 is redirecting to www.localhost in all browsers

This is happening on OS X 10.8 in both Chrome, Firefox, and Safari. There is currently nothing running on port 3000 so I cannot imagine it is related to the Rails project there. It seems to be system ...
-1
votes
3answers
77 views

Can you surf to a site that has shared hosting with ipadress?

Is it possible to surf to a site that has shared hosting on the web hotel with the ipadress? Can you change the hosts file in any way?
2
votes
2answers
2k views

How do I redirect a domain to another domain locally?

My /etc/hosts file looks like this: 127.0.0.1 localhost 10.20.7.67 testsitealpha.dev othersite.dev testsitebeta.dev The first two work. The last one doesn't. Why not? How do I make it ...
8
votes
4answers
2k views

Hosts file for Chromebook?

Is there a way to modify the hosts file in Chrome OS? ­­/etc/hosts The file is read only, so trying to modify it using sudo vim does not work. I have read that disabling root filesystem ...
1
vote
1answer
168 views

Google Chrome reads hosts file changes for too long

When I use the system hosts file to override DNS, Google Chrome takes longer than I'd like to pick up the changes, sometimes requiring a minute or longer to notice. Is there any way to make this ...
0
votes
2answers
272 views

trouble adding sub URLs / pages inside a domain to /etc/hosts file

I want the hosts file to block www.url.com/page without blocking www.url.com step 1 ////////////// I've added 127.0.0.1 www.apple.com to my /etc/host file When I do ping www.apple.com I get this ...
1
vote
2answers
40 views

Blocking a site from myself and redirecting

I've tried editing "C:\Windows\System32\Drivers\etc\hosts" by adding: 127.0.0.1 websitetoblock.com But I can still access the website. Ideally I want to be redirected to a URL of my choice if I try ...
0
votes
1answer
32 views

Bizarre domain/host file/browser issues. A real chin-scratcher

I was working on a dev site yesterday (of which I have a modified host file to view) when all of the sudden Chrome stopped being able to load the site. Or the production site (no host file mods ...
0
votes
1answer
334 views

Network Manager overriding /etc/hosts file

I believe the network manager service on Oracle Linux 6 is causing problems for the clouder-scm-agent which is running on my machine. The clouder-scm-agent starts up on the server ip it resolves from ...
0
votes
2answers
71 views

How to give a name to a site in test server in my LAN and make the testers able to login into that site [duplicate]

I am building a Facebook app. Facebook requires I access sites by name and not by some address like 192.168.1.200:7654. But the testers are accessing the site like this now, i.e., by using this ...
2
votes
1answer
285 views

Creating hostsname aliases through dscl does not work in Mountain Lion

I read a few places that dscl is preferred over /etc/hosts for adding hostnames (for instance when developing). But in Mountain Lion (OS X 10.8) I cannot get it to work (others too). I have read ...
1
vote
0answers
63 views

Finding the domains for Microsoft Word on Mac

My parents both use Macs to do their work and my dad bought three licenses for Microsoft Word on Mac. The problem is that he somehow set up the programs so that only one can be used at a time, meaning ...
1
vote
4answers
979 views

Can updating the hosts file in Windows via batch file cause harm?

I have this script that I have saved as a .bat file. Can it hurt a computer? echo # >> %Windir%\System32\drivers\etc\hosts echo 0.0.0.0 www.facebook.com >> ...
0
votes
1answer
58 views

Redirect remote file to another

I'm using Windows 7, and I wanted to know how could I make it so that when my PC try's to connect to a defined remote file it will redirect it to another. Example: http://www.a.com/image.png to ...