Nuke The Nasty Servers – HOSTS File Blocking


Nuke The Servers

In a perfect world, all content on the Web would be free. But in case you didn’t get the memo, it’s not a perfect world. Someone, somewhere, somehow, has to pay for the bandwidth and content you are consuming every time your Web browser retrieves a Web page. Due to this unfortunate reality, many sites on the Web are slathered with banner ads.

Personally, I don’t mind paying my dues, to an extent, by donating limited real estate within my browser to the banner ads that support the Web site whose content I wish to view. Advertising is what greases the wheels on which much of the Web is run.

As long as there has been online advertising, there have been moronic, evil and mischievous people abusing the medium for their own misguided purposes. Too often, the unregulated and self-policing nature of the Web is abused in a number of ways to target anyone unfortunate enough to encounter a connection to an evil Web server. Or, even a not-so-evil Web server unintentionally dispensing “malpurposed” data. (Did I just invent a word, there?)

While many people install Ad-Blockers to eliminate any and all advertising, I believe that is simply the wrong thing to do, and it hurts everyone who uses the Web. It hurts site owners who must incur the expense of developing and managing the site. It hurts the advertisers who support site owners. And ultimately, it hurts the user community as a whole, because without content, the Web loses purpose.

The HOSTS File

My choice and recommendation to others is HOSTS file blocking. This method can block unwanted third-party ad and tracking servers without blocking the host site providing the content.

The HOSTS file is a small, somewhat obscure file in nearly all operating systems. The file is part of the Internet Protocol (IP) implementation of the Operating System (OS). While it is little-used these days, it can be used to completely block any nefarious server from probing its grubby little tentacles into your computer.

hosts file

Basically, the HOSTS file over-rides Domain Name Server (DNS). Every time your computer tries to access a destination on the internet, it first checks with the HOSTS file for an Internet Protocol (IP) address. If there isn’t one for the destination in question, the next stop is a DNS server to convert a “” address to a numerical IP address. If there is an entry in the HOSTS file for that destination, the HOSTS file is then the authority and no DNS lookup takes place.

How It Works

Here’s how it works. To block a nefarious server, you simply replace the domain’s real IP address with on a line in the HOSTS file. Since that address ( doesn’t exist anywhere on the Web, there is no contact between your computer and the nefarious server. Because the HOSTS file overrides DNS, adding a line that tells the computer “‘s” IP address is prevents the computer from finding the site.

It is a simple process to add listings to the HOSTS file for servers on the Web that you wish to avoid. While it is easy to do, there are many thousands of undesirable servers. Adding them manually, one by one, would take many hours of work. Fortunately, there is an easier way.

A sub-domain of the Web site (Microsoft “Most Valuable Professionals”, or MVPs) is dedicated to maintaining authoritative information and providing updates to what is known as the MVPS HOSTS file. The site explains how using HOSTS file blocking can speed the loading of Web pages and block sites from tracking your browsing and viewing sessions, limiting their data-mining efforts.

The MVPS HOSTS file includes entries to block servers that host most Parasites, Browser Hijackers and unwanted Ad-Ware programs that target unprotected Web browsers and computers.

There Are Downsides

While HOSTS file blocking is an effective means of avoiding unwanted Ads, Tracking and Malware, it is not without it’s downsides. It’s not necessarily a set-and-forget proposition. Bad servers come and go. New servers come online every day. The HOSTS file needs to be updated occasionally, plus there may be times when you want to allow access to a blocked server for one reason or another. These issues can be easily managed with a HOSTS file manager app, such Hostsman, a freeware application to help manage, update and edit your HOSTS file.

HostsMan HOSTS file manager

In my view, Ad-Blocker programs do a disservice to both site owners and, ultimately users. Ad-Blocker software may leave a message like, “Ads blocked by AdBlock”, or similarly, on the site’s traffic logs. That is an unfortunate and unnecessary insult to the site owner providing the content and bandwidth you use when you visit that site. The HOSTS file may block the same ad or server, but it does so without adding insult to injury.

The MVPS HOSTS file doesn’t block ALL advertising. It only blocks servers that are known to be unfriendly or risky. That’s the way it should be. Banner Ads from a first-party site on which you are consuming content should be allowed. It’s only fair.

For complete information on the very simple process of installing the MVPS HOSTS file on your system, I refer you to the detailed guide at the venerable site:

Editing the HOSTS file manually can be done with any simple text editor, including Notepad, however, Administrative Privileges are required, so when launching the text editor, you must use the Right-click Context Menu, and select. Run As Administrator.


editing the hosts file requires administrative privileges

When saving the file after it has been edited, the text editor may default to saving the file with a .TXT filename extension. The HOST file will not work if saved with any filename extension. Therefore, you must make certain to change the “Save as type” option to “All Files (*.*)”

It is important to note that many Malware programs attempt to manipulate the HOSTS file to redirect your browser to advertising sites or to servers that will attempt to infect your system with malicious files. It is very easy for this to happen to an unprotected HOSTS file. For this reason, many AntiVirus programs prevent access to the HOSTS file by default. This is a good thing. You must remember to enable HOSTS file access when updating or changing entries in the HOSTS file, then reset the option to block HOSTS file access when the changes are completed.

Have you used the HOSTS file to block ads or nefarious servers? Do you use ad blocking browser extensions? Do you Have any HOSTS file tricks to share? Please leave a comment below.

5 thoughts on “Nuke The Nasty Servers – HOSTS File Blocking”

  1. Daniel. I appreciate your post, but the amount of work and risk in using HOST files is beyond the scope of novice users, imho. I prefer using something easier and unfortunately it blocks almost all adds (good and bad), Mindblower!

    1. I appreciate your comment. But, I disagree. The mvps hosts file site does a great job of explaining HOSTS file blocking, and provides all the tools to make it easy. The HOST file can be installed automatically and the Hostsman app makes management issue a snap. That said, I also agree that it isn’t the perfect solution for everyone. I’ve been using HOSTS file blocking since Windows 98. I also haven’t had a computer virus since Windows 98. I update my HOSTS file 3 or 4 times a year, and I don’t have an additional program running in the background. HOSTS file blocking takes no resources.
      But, thanks for sharing. I’ll take a look at Mindblower, just out of curiosity.

  2. Good read and I agree, nothin’s free. I believe lots of people think their internet provider “bill” however that comes , telco or cable co, covers it all. I always felt blocking would be counterproductive.

  3. I have no idea after a few hours trying how to easily enter exceptions either directly to the Hosts file or using HostsMan.
    Your instructions above may have once been accurate but no longer.
    I am Windows 10, & up to date.
    The worst part is I can’t even be sure my regular PayPal site is being blocked by a Hosts file limitation or by an AV doing effectively the same thing.
    The point is surely it’s 2017 & this stuff should be plain ailing to ordinary PC users who are frequently blamed for lack of care, ignorance & plain old foolishness. Well it’s hard to be enthusiastic with the quality of much which is intended (I think) to offer superior protection

Comments are closed.

Scroll to Top


Get great content like this delivered to your inbox!

It's free, convenient, and delivered right to your inbox! We do not spam and we will not share your address. Period!