If you're new here, you may want to subscribe to my RSS feed or email alerts. Thanks for visiting!

A little googling taught me to manipulate my Hosts file in the Windows system directory. The Hosts file basically has the mappings of IP addresses to host names which is loaded into memory during startup. When you enter an URL in your browser, Windows checks the Hosts file before accessing the DNS servers. All you have to do to prevent certain sites from loading is to manipulate this Hosts file. Doing this will make the listed files inaccessible from any browser. The hosts file is located at:
| Windows XP | = | C:\WINDOWS\SYSTEM32\DRIVERS\ETC |
| Windows 2K | = | C:\WINNT\SYSTEM32\DRIVERS\ETC |
| Win 98/ME | = | C:\WINDOWS |
You can open the Hosts file in Notepad and add any site that you wished to be blocked in the following format: 127.0.0.1 ad.doubleclick.net where ad.doubleclick.net is the domain you wish to block and 127.0.0.1 is the DNS address it resolves to which in fact is a blank address [see graphic above]. Now if you are wondering that how the heck to obtain the addresses of all the advertising sites that clog your browser then look no further than HOSTS Secure. This utility installs a constantly updated Hosts file and even locks it for additional security.
You may find your usual ad serving sites such as Adsense, YPN, Adbrite, etc. blocked as well. You can always go and edit the Hosts file and remove the reference to those addresses. Thus, you can customize your ad-viewing preferences. I usually unblock the ads that I use on my blogs. There might be thousand other questions you have before you want to try this out. I suggest you check out the original site that I used to access this information. The FAQ section is pretty extensive and answers all questions you might have. The above images are also from that site.
Another advantage of this adblocking technique compared to other similar software patches is that, it also lets you permanently ban ordinary websites or blogs that you do not wish to even accidentally stumble upon. I use it to block certain sites that I have absolutely no interest in viewing even if they repeatedly link to me (talk-to-the-hand funda). Parents might use this to block sites with adult content (unless the kids figure out how to edit the Hosts files themselves).
Enjoy the ad-free web experience.
Article Tags >> Ads | blogs | Internet | web tools


August 4th, 2006 at 6:46 am reply
Not bad at all. Thanks!! I’ll try this at home. :)
August 4th, 2006 at 9:46 pm reply
Adblock almost blocks all the ads for me. Plain adblcok doesnt block any ads. You have to add filters for blocking the ads. Its easy to add filters to adblock. pierceive site provides filters for blocking ads. if u dont want to do it manually there is an firefox extension available for that. no need to messup the windows host file.
August 4th, 2006 at 9:58 pm reply
I use filterset G updater. My browser passes the “timesofindia test” :)
August 5th, 2006 at 10:51 am reply
Sameer, you may have to unblock few sites that you use regularly but apart from that, it works beautifully.
Saravan, I used Adblock with the updated filters from Pierceive too and use the Firefox extension too. There is no reason to fear messing with the Windows Hosts file because the app I listed above creates a backup. And this blocking tool is independent of browsers.
BD, cool! whatever rocks your boat :)