Javacoolsoftware Support: What is a Hosts file?
SpywareBlaster provides the ability to keep encrypted backup copies of your Hosts file. Should an unwanted program change your Hosts file maliciously, SpywareBlaster makes it easy to restore a good backup copy of your Hosts file - and restore proper access to web sites.
The HOSTS file
is a text file that maps an IP address to a name. It has no extension and can be viewed using notepad. At the top is an explanation of the simple syntax. Each line is an IP address, a domain name, and an optional comment placed after a #
sign. In Windows XP, 127.0.0.1 localhost
is the universal IP address of all local computers and is the standard hostname given to the address of the loopback network interface which refers to the local computer only.
The original purpose of HOSTS files was to map the proper address to a site's name but now its also used for blocking purposes. The loopback address
is used to stop web ads from displaying because 127.0.0.1 indicates home (the location of your computer) and whatever is redirected home will not leave the system. Anything that appears in your HOSTS file without an #
at the beginning, except from the "127.0.0.1 localhost" line, should be viewed with suspicion. In Windows Vista the IPv6
localhost is ::1 localhost
by default. To learn more about this, you can read Hosts File FAQS
and LMHosts and Hosts files
In Windows Vista and XP, the HOSTS file is located in this default location: C:\Windows\system32\drivers\etc\hosts.
Anything that appears in your HOSTS file without an # at the beginning, except from the "127.0.0.1 localhost
" line, should be viewed with suspicion. Although malware can be responsible for altering the HOSTS file in an attempt to redirect your browser, it does not do so without infecting other areas of your system.
To view the folder containing your Hosts file, go to
, and in the Open box, type: %windir%\system32\drivers\etc\
The easiest way to access and view the contents is by using Notepad.
- Double-click on the HOSTS file.
- A message will appear saying Windows can't open the file or Choose the program you want to open this file.
- Scroll down the list of programs until you see Notepad.
- Select it and click OK.
To view the Hosts file in Notepad automatically, go to
, and in the Open box, type: notepad %windir%\system32\drivers\etc\hosts
There are several Free Custom Hosts Files available for download.
The MVPS HOSTS File zipped version includes a batch file (mvps.bat) that will rename the existing HOSTS file to HOSTS.MVP, then copy the included updated HOSTS file to the proper location. Just extract the zip file to the location applicable to your OS as shown in the Install Instructions and let it replace (overwirte) the existing hosts file.Note: You may have to overwrite the hosts file in "Safe Mode" if you get "an access denied message" when trying to do it in normal mode.
If using Vista, be aware that it's UAC
(User Account Control) blocks access to the HOSTS file since itís a system file. To get around this you can either turn off UAC and edit it normally, or copy the HOSTS file to your desktop and edit the copy there. Then rename the copied file on your desktop to HOSTS and drag it into the etc folder. When asked if you want to overwrite the existing hosts file, click yes. See Updating the HOSTS file in Windows Vista
If you connect to the Internet using AOL, a custom dialer, through a Local Area Network (LAN) or a remote proxy server, using a HOSTS file may not work. Using a remote proxy server (which does the DNS requesting for you) prevents the HOSTS file from being used. The browser will route its request through the proxy server before your machine looks up an entry in Hosts. The DNS serivce needs to be disabled and computer rebooted for the HOSTS file to take effect. Failing to disable DNS service will result in slow performance
per MVPS instructions.