The HOSTS file is the virtual equivalent of the phone company's directory assistance. Where directory assistance matches a person's name to a phone number, the HOSTS file maps domain names to IP addresses. Entries in the HOSTS file override DNS entries maintained by the ISP. This makes the HOSTS file a common target of malware. By modifying the HOSTS file, malware can block access to antivirus updates or force you to a malicious website. It's a good idea to check the HOSTS file periodically. Here's how to find - and edit - the HOSTS file on Windows 7, Vista, and XP.
Click File | Open in Notepad and browse to:
Make sure the etc folder is highlighted (selected). Now change the file type so it reads "All files". You should now see the HOSTS file appear in the directory list.
Double-click the HOSTS file and it will open in Notepad for editing.
In Windows 7, you will not be able to save edits to the HOSTS file unless you open it directly from Notepad (follow the steps described above).
If you have difficulty saving the modified HOSTS file, check the file's attributes to see if it's been marked Read Only.