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

3
votes
4answers
12k views

Permissions for editing hosts file on Windows 7 Home Edition

I am running Windows 7 Home Edition on my laptop. I also have an instance of Apache Server running and am trying to create a virtual directory. I have updated apache's vhost-httpd file and now need ...
3
votes
0answers
3k views

Windows 8. Hosts file doesn't work

I am using Windows 8 developer preview (x64) for testing purposes. I want to access some local network resource by DNS. So, I've added next line to my hosts file (%sindir%/system32/drivers/etc/hosts): ...
0
votes
2answers
93 views

What are the important things that need to be taken care while setting a network connection between systems?

I have an application which has a client edition(workstation) and server edition(service). The client edition is on Windows XP and the server edition is on Windows Server 2003. We have a lot of ...
0
votes
1answer
283 views

How to display user defined message on the browser after blocking website using hosts

I am using the hosts file for blocking websites, and when we try to open that website the browser shows some default message, but I need to display my own message. Is there any possibility for ...
0
votes
1answer
2k views

Remove read-only status of hosts file

I'm trying to edit my hosts file on a Mac Tiger OS. When trying to edit the file I get the following output and I'm unable to save any changes. "hosts" [readonly] 14L, 330C` How can I fix this?
2
votes
1answer
343 views

Changed /etc/hosts entries, but they are still pointing to localhost

I've had two sites on my local host and have had mysite1.local and mysite2.local in my /etc/hosts file to pointing in my localhost. Now, I moved those sites into my homeserver (Ubuntu, Local network) ...
2
votes
3answers
676 views

ad blocking host file, shared to all computers on local network

I currently update my local hosts file with advertising server domain names and direct them to nowhere. Well, almost nowhere. I point them to 127.0.0.1 and I don't have a web service running so it is ...
19
votes
4answers
11k views

/etc/hosts getting reset in Lion

In order to do web development on my local machine, I use the /etc/hosts file to define hosts that point back to 127.0.0.1 to which I have Apache serve up via VirtualHosts. This works great, except ...
3
votes
2answers
1k views

Is there a way to cause chrome/ie/firefox to reload the local “hosts” file without restarting the app?

In my occupation as a sysadmin, I often find times where I need to "game the system" by editing the host file. Doing so preempts any dns records for a domain name and allows me to make the ip ...
15
votes
4answers
4k views

Force Chrome to open URLs as URLs, instead of searching

I have a local Apache server running, which is defined through /etc/hosts as "apache". So I often open pages like: http://apache/website/ Normally, this works fine. However, since I am using a more ...
1
vote
1answer
286 views

How to disable unneeded error message using hosts file in Google Chrome

OS=Debian squeeze, browser Google Chrome 15.0.874.106 I use the hosts file to block unwanted sites, especially ad sites, from loading into the browser. In Iceweasel/Firefox you can block "unable to ...
1
vote
2answers
4k views

Can't map certain port and path with hosts file

On my localhost I'm trying to map http://127.0.0.1:8888/site/ to www.test.dev. Hosts file is below. When I load http://127.0.0.1:8888/site/ I see what I want but for www.test.dev I just see Firefox's ...
0
votes
1answer
815 views

VMware NAT doesn't seem to look at my hosts file

I'm running two VM's in VMware Workstation 7: My primary work VM (hostname main), runs Ubuntu 11.04. Uses VMnet0, which I configured to use NAT, and a Debian-based appliance (hostname server), also ...
0
votes
1answer
524 views

Automatically change /etc/hosts on OS X 10.6

I edit /etc/hosts as a first line of defense to stop me going to certain distracting sites during the working day. Ideally I'd like to have two versions of hosts and a cron job that switches them ...
2
votes
2answers
10k views

How to reset hosts file back to default?

How do I reset my hosts file back to default? Windows 7 Ultimate 32bit C:\WINDOWS\system32\drivers\etc
11
votes
2answers
3k views

Simulate manipulation of the etc/hosts file in Google Chrome

How can I set up Chrome to reference hostname lookups locally and not from the standard etc/hosts file? When debugging a website, it's sometimes useful to set up entries in ...
3
votes
1answer
84 views

How can I view different internally hosted websites, set up as virtual hosts?

I have an old machine that I've converted into a web server. I'm wondering what the best way to make the websites viewable on the internal network, without using a proxy. I experimented with BIND, ...
2
votes
1answer
293 views

Blocking sites with Windows HOSTS file

The article http://lifehacker.com/146448/geek-to-live--ban-time+wasting-web-sites recommends editing the Windows HOSTS file in c:\windows\system32\drivers\etc as a way to block certain websites. I ...
3
votes
2answers
1k views

How can I redirect HTTP requests to use HTTPS?

Is it possible to automatically redirect HTTP to HTTPS? Can I amend my host file in such a way that when I visit http://www.hsbc.co.uk it will redirect me to https://www.hsbc.co.uk? or is there ...
1
vote
1answer
553 views

Point an URL to a local html-page via hosts file

I want to surprise myself with a picture of an evil looking monkey every time I access Facebook by habit or rather by addiction. Therefore I added the following lines to /private/etc/hosts: # Block ...
1
vote
0answers
45 views

Software for editing HOSTS file in windows [duplicate]

Possible Duplicate: Editing the HOSTS file Is there a software which allow you to nicely edit hosts file in Windows? For instance, it should allow searching, and will display information in ...
0
votes
2answers
5k views

How to auto-redirect browser URL to another page?

What I want: When users type a certain URL, say, reddit.com or cracked.com, that they get automatically redirected to another site... say khanacademy.org or something. I am volunteering at my local ...
10
votes
5answers
9k views

How does localhost 127.0.0.1 work?

I found some articles related to this, but they were not sufficient for me. I want to know how the localhost works and why is it the same on many different machines? How does the localhost block the ...
1
vote
5answers
1k views

Why does this line in the hosts file not work to block access to this site?

I've tried adding the following line to my hosts file in Windows 7: 127.0.0.1 nytimes.com The hosts file is located in: C:\Windows\System32\drivers\etc\ The idea is to block access to the New ...
0
votes
1answer
572 views

DatabasePath Registry Entry Not Working in Windows 7

I’ve set the HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DatabasePath registry entry in Windows XP and it works as expected; the system loads and uses the HOSTS file in the directory I’ve ...
1
vote
1answer
1k views

Hostname Aliases in XP Pro

In XP Pro how can I create a local alias for hostnames of some other computers on the domain? When I created an entry in any of hosts, lmhosts, or lmhosts.sam, I can ping a computer with the alias, ...
2
votes
3answers
140 views

How dangerous is it to translate IPs directly via hosts in Windows

Sorry for the inconvenience, as English is not my native. I use hosts to access some websites as DNS is polluted. My question is, take www.google.com as an example. If I am successfully social ...
3
votes
4answers
3k views

Expected behavior with duplicate NT hosts file entries?

I know that you shouldn't have duplicate entries in your Windows NT hosts file, windows\system32\drivers\etc\hosts, but what is the expected behavior if you have them? You can have multiple entries ...
1
vote
1answer
385 views

Automatically update ip-address in hosts file?

My development environment is Ubuntu guest OS inside VMWare Player with Windows 7 as the host OS. I edit the hosts file in windows to point http://dev.mydomain.com to the ip-address of my VM so that ...
2
votes
2answers
1k views

My hosts file is broken (windows won't read it)

I have Windows 7 Pro 64 bit and it won't read the hosts file ! I've googled around for quite a long time but I can't fix it, maybe someone here can help me. I can't see the .txt extension on the ...
9
votes
4answers
6k views

Bash: lookup an IP for a host name, including /etc/hosts in search

Ubuntu 10.10+ In my script I need to lookup an IP for a given host name. If that name is listed in /etc/hosts, then command should print IP from /etc/hosts, not from DNS server. What commands I ...
4
votes
2answers
4k views

How to reroute all traffic using hosts file?

Is there a way to redirect all traffic to one IP in the hosts file? If not, how else could i achieve this?
0
votes
1answer
870 views

Changing Windows 'hosts' file in guest OS under Parallels Desktop 6 on Mac

I am running Windows 7 in a Parallels Desktop 6 on Mac. On the mac, I use /etc/hosts: 127.0.0.1 mysite and it works fine; I can type mysite in the URL box and the website will display. What I ...
2
votes
1answer
1k views

IE ignores hosts file; works in Firefox

I've edited my hosts file in a Windows 7 VM, but it doesn't work in IE. It works with Firefox, though. I hope this itemized list will help more than a verbose description. Environment Windows 7 in ...
0
votes
1answer
485 views

Tweak hosts file to avoid issues with duplicate machines in a workgroup

I am a software trainer. Training facilities clone a master image onto multiple machines for the students. Previously, we used to name these student machines S1, S2, S3, etc. The downfall to this, ...
2
votes
1answer
724 views

can't override name resolution for firefox on Ubuntu

I need to override the name resolution for a given domain name for testing purposes in my browser (Firefox) on Ubuntu, so that when I write "www.agivendomain.org", it will point to a given IP that I ...
1
vote
1answer
187 views

Running two hosts files at the same time

I am developing on my local machine and I need to have a browser run on one host file and another browser run on a different host file. One browser would run a host file to redirect domain.com to my ...
1
vote
1answer
247 views

How can I disable connections to specific domains? [duplicate]

Possible Duplicates: Good free internet filter Using wildcards in names in Windows hosts file I'd like to block connections to specific domains. I know about the HOSTS file on Windows, ...
4
votes
1answer
3k views

Windows hosts file equivalent on Mac?

I am doing a project and uploading to a clients test server, however they only have IP address to access and suggested editing my hosts file. I'm on a Mac, where is the hosts file?
1
vote
0answers
144 views

Hosts file in windows 7 [duplicate]

Possible Duplicate: Problem with the hosts file under windows 7 I'm using Windows 7 Pro. I'm trying to add a new entry to Hosts file. But that entry doesn't seem to work. Browse to ...
1
vote
4answers
3k views

Browsers ignoring hosts file

Until recently my browsers started to ignore my hosts file. I have Windows 7 operating system installed. 192.168.0.5 livesite.com I have tried: Clearing browser cache Issued "ipconfig ...
5
votes
4answers
1k views

Windows redirect traffic to different DNS name not fixed IP address (hosts file equivalent)

Using the Windows hosts file, one can redirect traffic for a domain to a specific IP address, e.g. domainA.com --> 127.0.0.1 I am looking for a SIMPLE way to do the same, but for a target domain ...
0
votes
2answers
554 views

What is Windows “hosts” file alternative for OSX?

I just got a Mac computer (OSx v10.6) to test my web site design. Web site is running on the local network, and in windows computers I use "hosts" file to map its network IP address to domain name, ...
1
vote
2answers
671 views

Global Hosts file WINDOWS [duplicate]

Possible Duplicate: Can I have Windows use additional HOSTS entries from a file server? How can I set up a global windows hosts file on my network. I have a server store the file on.
0
votes
1answer
203 views

Can I have Windows use additional HOSTS entries from a file server?

I have a network of computers and a server. I often need to edit the hosts file of all the computers to add a new entry or to change one. e.g. 192.168.1.101 temporary-internal-site How can I get ...
0
votes
2answers
4k views

Host file not working on Windows 7

Our ISP accidentally switched us from a static IP to DHCP (long story) and it might be another day or two before we get our static IP back. In the meantime I'm trying to just use a host file on my ...
3
votes
1answer
360 views

Hosts file - Many entries

I noticed Spybot - Search & Destroy adds almost 15k entries on the hosts file (C:\Windows\System32\drivers\etc\hosts) if you decide to immunize. Does this decrease the computer performance, ...
4
votes
7answers
5k views

My Hosts file broke: Ping request could not find host test

Here's my hosts(with a single entry): 127.0.0.1 test But it's not working any more: C:\Documents and Settings\Administrator>ping test Ping request could not find host test. Please check the ...
2
votes
1answer
12k views

Adding localhost entry to Windows\System32\drivers\etc\hosts file with port number

I have set up a local site under IIS 7.5 under port 900. to access it I should type localhost:900 in the address bar. I'm a little bit familiar with the System32\Drivers\etc\hosts file and I know I ...
1
vote
2answers
840 views

How to block a specific site's directory in windows?

How can I block a specific directory of a website as e.g. http://example.com/someSite unfortunately the hosts file is not an option since you can only block whole domains there and any "/" just ...