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
4answers
2k 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 >> ...
3
votes
2answers
1k 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 domain name riddergarn.dev to 127.0.0.1 with ...
1
vote
2answers
415 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 ...
1
vote
2answers
945 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
40 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
160 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
363 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
568 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
196 views

Editing hosts file to block sites not working

I put these lines in my C:\Windows\System32\drivers\etc\hosts file: 127.0.0.1 www.cnn.com 127.0.0.1 cnn.com 127.0.0.1 facebook.com 127.0.0.1 www.facebook.com 127.0.0.1 www.hotnews.ro 127.0.0.1 ...
2
votes
1answer
357 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
855 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
47 views

Block (nullroute?) an IPv6 hostname using /etc/hosts

I'm trying to prevent my web browser from communicating with certain hosts (mostly ads and tracking). I have a list of such hosts in my /etc/hosts file. For IPv4 I can do: 255.255.255.255 ...
1
vote
1answer
734 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
321 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
33 views

Replace local host file modification with remote. Proxy server or something else?

I need to find a solution for a problem described below (both servers running CentOS 6) My goal is to have visible website to the public where a client will type own domain name mydomain.com and then ...
0
votes
1answer
154 views

Host angularjs.org not found: 3(NXDOMAIN)

My MacBook Pro OSX 10.9.4 has network problems now, and I cannot figure it out what is causing the problem. Today I am not able to access angularjs.org with any browser, but I can access other ...
0
votes
1answer
55 views

Blocking specific websites from browser (PC and phone) while preventing myself from unblocking them without content of others

I am trying to find a PC software (and app for phone) to block specific websites, and only the person with certain privilege (e.g. who knows the password) can unblock certain websites. (I haven't yet ...
0
votes
1answer
59 views

Granting an Ampps privileges to edit hosts file

How could I grant an application such as Ampps privileges to be able to edit hosts file. I need such feature to easily handle local Vhosts using it. I use Windows 7 64 bit and Ampps ver. 2.4
0
votes
1answer
48 views

Where does Gas Mask store its data on OSX?

I use Gas Mask to manage my hosts file on OSX. Where does it store its data?
0
votes
1answer
176 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
609 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
61 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
105 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
271 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
73 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
233 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
47 views

Create User Profile Specific Hosts File?

I know that by editing my C:\Windows\System32\drivers\etc\hosts file I can block any site, but I would like to take this a step further. Is it possible to have different version of this file for my ...
1
vote
0answers
838 views

How do i make Chrome use an IPv6 address from my hosts file?

I have a Windows 7 machine that's running Ubuntu in a VM. The VM has an interface configured as an IPv6-only, host-only network. The network is statically set up, and all that seems to be working. ...
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
47 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
31 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
67 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
130 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
624 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
81 views

Cold Turkey not working with custom DNS server address

I blocked a few sites in cold turkey (http://getcoldturkey.com/) but after changing my preferred DNS, I discovered those rules weren't working. Is there a way to correct this?
0
votes
0answers
68 views

Check local hosts file (Win7) and proxy.pac

I have two groups of computers at the school: 1) computer lab, and 2) anywhere else. These are all Windows 7 machines. Up to now, I've had two versions of the Window's hosts file depending on which ...
0
votes
0answers
28 views

Additional password for hosts file on mac

Is it possible to set up an additional password for changing the hosts file on mac? When i use the command: sudo nano /private/etc/hosts I have to use the admin password to enter the hosts file. ...
0
votes
0answers
131 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
136 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
88 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
60 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
363 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
505 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
88 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 ...