How to Repair the Hosts File in Windows Vista
The Windows hosts file is commonly targeted by browser-hijacking software. This small text document lets a user override normal domain look-up requests and instead forces browsers to serve completely different web pages. Unscrupulous advertisers have known of this feature for years and continue to write software that forces browsers to load their advertisements in place of legitimate websites. Windows Vista offers system file protections that help defend against this, but sometimes modification of the file can occur from trusted applications and system exploits. Fortunately, Microsoft provides a little-known tool that will reset this file to its default configuration.
Things You'll Need
- Computer running Windows
- Internet connection
- Administrator account
- Web browser
Instructions
-
-
1
Log in as an Administrator on the machine you wish to repair. This is necessary because the hosts file is in a protected area of the system.
-
2
Open a new browser tab or window and go to the Microsoft Support Center's entry for this problem. The website is at http://support.microsoft.com/kb/972034.
-
-
3
Click on the "Fix It" icon and choose to save the file to your hard drive. Once the file has downloaded, open it. Upon accepting the terms, click "Next" until the repair utility completes. If it asks for administrative permission, click "OK" to grant it.
-
4
Ensure that the repair wizard has completed, it will state "This Microsoft Fix it has been processed" if the file's restoration was successful. Click "Close" to exit.
-
5
Verify that the fix was successful. Open Notepad and go to "File," then "Open." Navigate to C:\Windows\System32\Drivers\etc\ and open the file named "Hosts."
On Windows Vista machines, the only text in this file that does not begin with the # symbol should read:
127.0.0.1 localhost
::1 localhost
-
1
Tips & Warnings
Programs need administrative access to modify your hosts file. Windows Vista's User Account Control feature helps to protect you from these programs. You should keep it enabled and give permission only to programs you trust.
If you are unable to resolve your problem, contact Microsoft Support at http://support.microsoft.com/contactus.
Be sure you open the hosts file only with Notepad. Opening and overwriting other files in system directories could permanently damage your operating system.
Overriding DNS settings with the hosts file can break software that needs Internet access to work. If you are going to modify the settings in this file, be sure to research all possible repercussions.