Thursday, September 20, 2012

How To: Use a HOSTS file with Windows 8

I was shocked to find out that Windows 8 out of the box will overwrite your changes to the HOSTS file. Oh, their motives are pure enough. Apparently some malware uses HOSTS to redirect common sites like Facebook. You type in "" and your browser takes you to some phishing site where you type in your Facebook password, and things just go downhill from there.

Windows 8 LogoSounds scary, right? It's good that Windows is trying to protect you, right? Well, yes and no. The problem with Windows hijacking your HOSTS file is that there's lots of valid reasons to put your own entries in there. For example, I use a custom HOSTS to block advertisements. It's the best way really. Your computer won't even connect to all those ads. It's the best ad-blocking you can get, and you're not even running any extra software since it's just a text file.

Also, lots of IT departments use custom hosts entries for administration purposes. There's a few other good reasons to use it as well, such as preventing obnoxious applications from phoning home. Ultimately, I don't think Windows has any valid reason for stopping your valid entries to HOSTS.

So how do you keep Windows from keeping its nose out of your HOSTS file? Easy, disable Windows Defender, which is the culprit. When I first heard that Windows Defender would be built into Windows, I thought "about damn time." Well, that enthusiasm was very short lived. Like 10 minutes.

It's easy to turn off Windows Defender in Windows 8. First, go to the start menu and just start typing "defender" until you see the Defender icon, as shown below.

Windows 8 - search for Defender

Next, click on the Settings tab and choose Administrator. Then, uncheck the "Turn on Windows Defender" box and save your changes.

Windows 8 - turn off Defender

That's it! You are now free to do whatever you want with your HOSTS file free from the tyranny that is Windows Defender.

NOTE: The HOSTS file lives in the same location as it does for Windows 7:

HOSTS lives under c:\windows\system32\drivers\etc

No comments:

Post a Comment