One way I stay protected from bad sites is that I use a modified host file. In Vista and Windows 7 you cannot just open the file in notepad and save it anymore, you will get an error. Someone had this happen at work on Windows Server 2008 last week and just today someone asked about it in our forums here: Can’t modify the host file on Windows 7

I decided to create a short little blog post explaining how you can modify this file.

If you open the host file in the following location C:WindowsSystem32driversetc with notepad and then you want to save it you will get one of these errors in Win 7/Vista/Server 2008

Access to C:WindowsSystem32driversetchosts was denied

**Cannot create the C:WindowsSystem32driversetchosts file.

Make sure that the path and file name are correct.**

I am getting the following error on my Windows 7 machine

In order to fix this you first need to run notepad as an adminstrator. Here is how you do this. Click Start–>All Programs–>Accessories, right-click on Notepad, and then click Run as administrator. This might ask you for a password, enter it

Now from notepad press CTRL + O (or File–> Open) and navigate to the host file after you make your changes save it..that should work.

I like to use the MVPS HOSTS file, this file is pretty extensive, it has over 16000 entries. Since my PC is used by my wife and my oldest son this is some extra protection that I have in case they get to a bad site.

Here is just a small sample of entries in this host file

_# [Rogue/Suspect Anti-Spyware Products] #[] #[ADS Adware Remover] #[Adware-CodeClean] #[McAfee.DoctorVaccine] #[Win32/Adware.ErrorDoctor] #[Symantec.MyBugFreePc]_

Here is the link to the file in plain text

What about you, do you use the host file to block bad sites?