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

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
4answers
992 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 >> ...
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 ...
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
2answers
67 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
2answers
329 views

Forbid connection to IP address in hosts file doesn't work?

The hosts file is used to map hostnames to IP addresses. However, I only have an IP address. I tried using HostsMan, but it doesn't want to even add the line. How do I add a line to the hosts file ...
3
votes
1answer
383 views

Access mac virtual host from a virtual machine

Here's my setup: I'm developing a website on a mac. I created a virtual host, so I can open up my browser, type http://cpp and it will point to the right directory. I want to test this website out ...
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
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
595 views

Hosts file changes are not recognized in windows 8

When i make changes to the hosts file in windows 8, it doesn't work. Although my changes stay in the hosts file. What I'm trying to, is to redirect the domainname riddergarn.dev to 127.0.0.1 with ...
1
vote
1answer
653 views

Hosts files keps reverting when I turn off my computer.

I have changed my host file to allow me access via RDC to computers over VPN network. I change the ip's and it works fine. My problem is that every time I log back onto my computer they have ...
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 ...
0
votes
1answer
27 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?
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
341 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
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 ...
0
votes
1answer
332 views

Firefox not taking note of /etc/hosts?

I've set foo.com to 127.0.0.1 in my /etc/hosts file in (located here on Windows: C:\Windows\System32\drivers\etc\hosts). Though Chrome loads foo.com with the one hosted locally on port 80, Firefox ...
0
votes
1answer
94 views

hosts file handles specified domain but not a longer path

Trying to resolve a website domain to localhost for development purposes. I am developing on a Wordpress Installation which has some inherent hardcoded redirects to the domain it is installed on. So I ...
0
votes
1answer
266 views

After reset /etc/hosts, firefox stuck requiring authentication

I have a test site, which need authentication to access. The map between ip and domain is given in /etc/hosts. Today, the ip of the domain changed, so I modifid /etc/hosts. Then the bad thing happens, ...
-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? ...
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): ...
2
votes
0answers
160 views

Cannot access shared drive in same machine uisng machine name but can access using IP

I have 4 desktops running Windows Server 2008 32bit version. I created some shares in all these machines. My program gets files from these machines (like \machine1\abcd). The machine names mentioned ...
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 ...
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 ...
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
0answers
110 views

Why does OS X Snow Leopard have two hosts files?

I noticed that OS X has two hosts files: /private/etc/hosts and /etc/hosts. What is the difference between them? I was attempting to modify my iMac's hosts file in Terminal and tried the usual sudo ...
1
vote
0answers
525 views

Can I force Tor/Polipo to use locally defined hosts?

I would like to use addresses defined in my hosts file while using Tor. I have the Tor (non-browser) bundle installed: Tor, Polipo and Vidalia. I do not use Torbutton. My browsing is normally done ...
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 ...
0
votes
0answers
57 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
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
63 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. ...
0
votes
0answers
127 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
0answers
138 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
0answers
294 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 ...
0
votes
0answers
85 views

switch hosts-file during win7 boot process

I have 2 hosts files on my win7 machine that i switch manually (.bat file run as administrator) when i'm either in the company vpn or connected to the comany network directly. What i would want is an ...