ghacks Technology News

Block Ads Using Your Host File

This has been around for some time now but its possible that some of you have not heard of it yet. I found a site through digg.com that has a neat list of 40000 entries that you could partially or fully add to your windows host list and prevent ads from those 40000 hosts to be shown on your system, ever again.

Whenever you open up a website that has a ad link on it it changes the hostname of the ad to the one of your computer, which means of course the ad cannot be found and thus not displayed. Its an easy trick. I would be cautious nevertheless, a list of 40000 is not easy to maintain and overlook and it could be that hosts are in that list that you want to have displayed. I´d suggest you take a look and see for yourself, maybe add only some ads to your hostfile from sites that you visit a lot.

They have a nice faq on that site which answers lots of basic questions e.g. uninstallation, download, install etc. Pretty good site.

Though it has been in circulation for a few years, a text file called “Hosts File” lists 6,000 entries that you can add to your Windows host list, preventing ads from the listed hosts from popping up on your operating system.
Every time that you open a website, which is probably quite often, there is an ad link on it that changes the ad hostname to your computer name. Thus it is hidden and cannot be found in a search and they are never displayed. The only drawback to Hosts File is that it may list hosts that you do want to display. It would take some tedious editing to weed through 6,000 host entries. A true geek with a sharp eye and fast editing skills would have no problem with this and probably enjoy it. There are few people of such a nature, so it is advised that you look through the list and include a certain selection of hosts to your host file.

A small group of security-conscious techies have compiled a list of 6,000 plus banner advertizing companies and providers including high-risk sites that deliver pop-ups, dialers, spyware, adware, malware, scams, cookies and all of those fun things we just don’t want. Whenever a banner ad is requested from a server, this file tells your computer that it is in its black list, reversing the order of execution that would normally occur so that your computer does not contact the server, but requests itself instead. There are no advertisements on your computer so nothing will be displayed.

This will stop cookies, pop-ups and hostile scripts. Connection speed is increased and you don’t have to be annoyed anymore. If you should find that this does not work out, simply delete the Hosts File from the location in which you stored it and reboot. Alternatively, you could selectively edit it.

Hosts File works best in the following operating systems:
Macintosh OS8/OS9/OSX 10.1/Jaguar
Windows 95/98/ME/NT4 SP6/2K SP3/XP (Pro/Home/Media)/2K3.NET/Vista/PocketPC
Linux/Mandrake/Debian/BeOs/SuSe/Knoppix/RedHat
It does not work well with Windows 2000/XP/NT based operating systems or older Macintosh operating systems.
Hosts File is a Zip file and you will need to save it to the desktop before extracting the text file so that you can place it in the correct location as detailed in the website FAQ.

Many readers must be wondering about compatibility with Windows 7. Windows 7 ignores its hosts file by default and they supposedly cannot be accessed. If you want to use Hosts File with Windows 7, there is a trick you can use. The Windows 7 hosts file is located in C:\windows\system32\drivers\etc\ or %systemroot%\system32\drivers\etc\ and cannot be edited by normal users. To edit the hosts file, Click Start – search for “Notepad“, right-click and select “Run as Administrator“. This should launch notepad with elevated privileges. Open the host file from the File menu, edit and save. That should do the trick.

Hosts File is a useful text file to add to your computer’s hosts file and enhance security, but be cautious about it. If it causes any problems, delete it from the file location and reboot. Everything will go back to the way it was.

Enjoyed the article?: Then sign-up for our free newsletter or RSS feed to kick off your day with the latest technology news and tips, or share the article with your friends and contacts on Facebook or Twitter.

Related Articles:

Free File host List June 2006
Free file host list december 2005
Upload Files To Multiple File Hosts
Windows Hosts File Optimizer
Free File Host List November 2005



About the Author:Martin Brinkmann is a journalist from Germany who founded Ghacks Technology News Back in 2005. He is passionate about all things tech and knows the Internet and computers like the back of his hand. You can follow Martin on Facebook or Twitter.

Author: , Thursday November 24, 2005 -
Tags:, , ,


Responses so far:

  1. tom says:

    I´am not sure if it is such a good idea to add that many entries to the windows host file.

  2. larman says:

    FYI: sites such as WallStreetJournal, CBS, etc. use some of these ad sites, so pages may not be fully function when visiting legitimate websites.

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

Subscribe without commenting

© 2005-2012 Ghacks.net. All Rights Reserved. Privacy Policy - About Us