Monday, July 19, 2010

Using the HOSTS file to block certain web sites

The oft-discussed HOSTS file is nothing more than a list of web sites that will be blocked if you try to get to them. If you use the recommended MVPS HOSTS file, the list of web sites contains web addresses of sites that have been known to cause trouble.

Suppose you have someone in your house who is visiting a web site that you'd like to block? If that is the case, you can manually add the site, or sites as the case may be, to your HOSTS file.

Here is how to do it. In order to follow these instructions you need to have view access to hidden and system files. To gain this access you can go into Windows Explorer, Tools/Folder Options/View. Once there, uncheck the boxes that prevent you from viewing these files.

Now that you can view hidden and system files, go to this location, C:\Windows\System32\drivers\etc. Once there you will see the HOSTS file. In XP, right click on the filename, select Open With, and then select Notepad.


Once the file is opened, you can simply insert a blank line anywhere you like, and either paste the web site you wish to block or key it in manually. Then SAVE the file. Voila, the offensive web site is now blocked on your system (after the next reboot). I would suggest you take note of the sites you add, and keep them all together like starting maybe at line 100,  because remember this file will become the OLD file next month with the latest update and you will have to copy them all into the new HOSTS file.

Write me if you need help with this.