Ensure that your Hosts file has not become corrupted by viruses
Domain Name System (DNS)
As you probably know, Computers talk back and forth over the internet using IP Addresses which contain 4 numbers from 1-255 separated by dots. The IP address is like a phone number for your computer over the internet. Unfortunately it is not too easy for a person to remember an IP address. A web site name (such as cnn.com) is much easier to remember, but computers cant talk using names like these. To fix this problem, there is a system that maps web site names to IP addresses (called the Domain Name System, or DNS). When you want to go to a web site such as "www.cnn.com", your computer asks the DNS server "what is the IP address of 'www.cnn.com'", and the DNS server replies with the IP address that www.cnn.com is hosted on.
What does the Hosts file do?
The "Hosts" file is used by windows to circumvent the DNS system. It is usually only used for testing purposes. Say I had a test server that I used that was an exact copy of this site just a different IP address. I could put an entry into my hosts file that says to point to the test server IP address whenever computeradvice.mikebinns.net was contacted. This way I could make changes to the test server and test them out without breaking the regular server for all of you.
How can the hosts file be used by viruses
Some of the viruses in the wild now use the host file to prevent you from going to important sites such as microsoft.com and symantec.com (preventing you from getting critical updates and antivirus). They also sometimes block stuff such as ebay or other often used sites. The way they do this is by putting an entry into the hosts file that points the web site (such as microsoft.com) to the "loopback IP" of 127.0.0.1. Whenever your computer contacts 127.0.0.1 it is actually contacting itself (hence the name loopback IP).
How can the host file be used legitimately
Some programs use the hosts file to prevent your computer from loading advertiements and spyware. If your hosts file has a lot of entries for advertisement websites, these may be in there legitimatly. Unfortunatly it is not easy for the average user to determine if hosts file entries are legitimate or not, so I suggest that home users remove all except for "localhost".
Fixing Hosts File
The best way to fix the hosts file is using Microsoft Antispyware. The problem is that if you haven't already installed it and the hosts file for microsoft.com was modified, you wont be able to download it.
If you have Microsoft Antispyware installed, scroll down to the "Using Microsoft AntiSpyware" section. If you cant install Microsoft AntiSpyware, use the "Emergency Way"
To access your hosts file without Microsoft AntiSpyware, click the start menu->run. type in "c:\windows\system32\drivers\etc" (without the quotes) and press enter. If the page that opens warns you that the files are system files, click "Show me the files anyway".
In the folder there will be a number of files beginning with "hosts". The one you want has no extension (i.e. it is just "hosts" not "hosts.bak" or "hosts.msn"). Double click it and an "open with" box will open up. Scroll down and double click "WordPad".
You will see some lines starting with "#"'s, scroll down to the first one that doesn't have a # on it. This one will most likely be "127.0.0.1 localhost". This is the localhost loopback and is valid and ok to leave. If there are any entries below this one, delete all the lines below it. Click "file"->"save" and then close the hosts file.
To fix your hosts file using Microsoft AntiSpyware, open the program from the red or blue target icon in the system tray or from the start menu->(all) programs->Microsoft AntiSpyware. Click the "Advanced Tools" icon then the "System Explorers" icon. Under the "Networking" section, click "Windows Hosts File".
You will see listed every item entered in the hosts file. There should always be the "localhost 127.0.0.1" entry, this is valid and ok to leave. If there are any listed below localhost, click on each one and click "Permanently Remove Host".
Once all the items (except for localhost) are removed, you can move on to the next section. If there were any other than localhost, it MAY mean your computer does or did have a virus at one time.
Progress Tracker Update (Click the checkbox and click next to update the progress checklist)
LEGAL DISCLAIMER: Although these instructions have been tested on thousands of computers without incident, and chances of any damage or loss of important data resulting from following these instructions are virtually zero, there always exists a very small chance that something could go wrong. I add the following warning not because I ever believe that anything will happen but because today's lawsuit happy world requires it:
Although I will attempt to assist you (via the contact me form) with issues that arise from following these instructions, you are using this website at your own risk, and I am not legally responsible for any damage or loss of data that may occur related to the use of this website.