• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details

How To: Remove all ads from all sites

Not open for further replies.


Broken In
Almost every page today has got ads these days and most of them are powered by Google Adsense, Adbrite, Chitka etc...

I remember from the day I started using Internet from that day I hated these ads a lot, as they always redirect me to somewhere else and then I just roam here and there in between the ads.

I have found a lot of scripts addons to stop these ads for Firefox, Intenet Explorer, but never found any universal way to do that. One day I was reading some of my old articles and I found this How to: Block a website. This remind me of my tweaking days, so I taught why not try to remove ADs by using this technique.

First you need to know What is Windows Host File?
The Windows Host File is a computer file used by an operating system to map hostnames to IP addresses. The hosts file is a plain-text file and is traditionally named hosts -WikiPedia

This file contains the mappings of IP addresses to host names. Each entry should be kept on an individual line. The IP address should be placed in the first column followed by the corresponding host name. The IP address and the host name should be separated by at least one space.

Additionally, comments may be inserted on individual lines or following the machine name denoted by a '#' symbol.

# rhino.acme.com # source server

So by now you must have get an idea what is an Host file. You can view your Host file at C:\WINDOWS\SYSTEM32\DRIVERS\ETC > HOSTS.

Well there are a lot of uses of HOSTS file but in this tutorial I am concentrating on how to block ads using this host file. This is done by using a dummy address, or local host address typically, (which is in fact the address of your machine locally that's why it is called Local Host). For example, consider this entry: wwww.yahoo.com

If this entry is saved in your host file then any reference to wwww.yahoo.com will be redirected to your own computer, and thus you are not able to visit Yahoo.com.

By further advancing this technique of blocking a site we will remove ads from all pages, lets know how. Now all you have to do is just follow these steps-

  • Open HOSTS file in Notepad
  • and after the line localhost
  • Copy the following lines and save the file.

#GOOGLEADS pagead.googlesyndication.com pagead2.googlesyndication.com googleads.g.doubleclick.net/ ad.doubleclick.net
#BIDVERTISER bdv.bidvertiser.com ads.bidvertiser.com
# ADBRITE 1.adbrite.com 2.adbrite.com 3.adbrite.com 4.adbrite.com ads.adbrite.com b1.adbrite.com bstats.adbrite.com click.adbrite.com files.adbrite.com pic.adbrite.com vid.adbrite.com site.www.adbrite.com stats.adbrite.com www.adbrite.com adbrite.122.2o7.net
#CHITIKA ads.chitika.net ads1.chitika.net blogads.chitika.net ca.chitika.net mm.chitika.net parking.chitika.net scripts.chitika.net
#ADTOLL adserve.adtoll.com
#CLICKSOR clicksor.com ads.clicksor.com main.clicksor.com mci12.clicksor.com search.clicksor.com serw.clicksor.com track.clicksor.com www.clicksor.com mp.clicksor.net
#YAHOO adserver.yahoo.com
#TARGETPOINT dev.targetpoint.com srs.targetpoint.com
#FASTCLICK fastclick.com www.fastclick.com #[SunBelt.FastClick.com] cdn.fastclick.net code.fastclick.net images.fastclick.net #[Panda.Spyware:Cookie/FastClick] media.fastclick.net secure.fastclick.net #[Tenebril.Tracking.Cookie] sp.fastclick.net fastclick.com.edgesuite.net #[a1795.g.akamai.net]
#BLOGADS b.blogads.com banners.blogads.com c.blogads.com cache.blogads.com d.blogads.com f.blogads.com img.blogads.com st.blogads.com #[WebBug] stat.blogads.com #[WebBug] weblog.blogads.com z.blogads.com www.blogads.com
#ATDMT c.atdmt.com click.atdmt.com #[McAfee.Cookie-Atdmt][Google.Diagnostic]
# clk.atdmt.com #[disabled affects MS downloads] ec.atdmt.com #[atlasdmt.vo.msecnd.net] image.atdmt.com ll.atdmt.com #[atlasdmt.vo.llnwd.net] mir.atdmt.com #[p.mii.instacontent.net] nc.atdmt.com #[EventTracking] rmd.atdmt.com #[a898.x.akamai.net] spd.atdmt.com #[a796.x.akamai.net] spe.atdmt.com srch.atdmt.com
# switch.atdmt.com #[disabled affects Hotmail signup] view.atdmt.com #[eTrust.Tracking.Cookie] www.atdmt.com

These lines are sufficient to remove all types of ads from all sites you visit, but in case you think it is not sufficient visit the following link and copy paste it to the host file.

ADS LINK :rules: by MVPS.org

Krazzy Warrior

"Aal Izz Well"
^ :D :lol:

nice! but i would prefer Ad Block Plus...Why to take tension of editing file when an extension is specifically designed for it..:)


Broken In
The above will work in IE8, Firefox and any browser you name! plus it also blocks ads from Live messenger + Yahoo messenger etc


Democracy is a myth
The above will work in IE8, Firefox and any browser you name! plus it also blocks ads from Live messenger + Yahoo messenger etc

Dude, ur efforts are appreciated.

But, if I want temporary ads, I need to go to hosts file and edit those particular filters.
So, I thought may be (may be, as I've not yet experienced that extension thewisecrab mentioned) it would support block/unblock ads on my whim...:razz:


Give some details about it....

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks.

Privoxy is Free Software and licensed under the GPL2.



œ∑´®†¥¨ˆøπåß∂ƒ©˙∆˚¬Ω≈ ç√∫˜
Nice tut. But what happens if you are a developer and you have tomcat running at port 80 :p
Not open for further replies.
Top Bottom