Block internet advertising through any web browser, terminal (without using plugins)

Today Internet has become an extremely popular medium, very dynamic, always moving … but several years ago an evil network was overwhelmed excess animated images (gif) that hinder reading, and also made ugly anywhere, today we got rid of much of the ‘fashion’ of the gifs and flash files well, BUT, our network today there is another enemy: Advertising

How many of you in one day access to Internet sites that have NO advertising?

Let us count from popular sites:

  1. Google (have advertising on search results)
  2. Facebook (more publicity could not have)
  3. Twitter (… similar to Facebook, too many ads)
  4. Sports sites like ESPN, Brand, etc. … the same, too much publicity
  5. And a GREAT etc etc

Today finding sites that have annoying advertising, intrusive (yes, AdSense talking about you!) Is really hard, the larger / more popular the site has advertising is almost constant (with exceptions of course).

Browsers are multiple, we have from Firefox, Chromium / Chrome, Opera, Rekonq, etc … and if we want to block advertising for all our browsers then need to install a plugin to do this in each of them, then the plug in continues to have support for the latest version of the browser, etc..

That is why Adblock is a very good alternative, I prefer to keep my method.

Block advertising for all our browsers without installing plugins

The file /etc/hosts serves as a small internal DNS, that is usually when our browser access a site (www.facebook.com, for example) the browser asks the DNS world in which IP address, which server is the site you wish to access, but in the /etc/hosts we specify the IP then there is no question that the browser should do.

So ( and going on ):

We suggest using our /etc/hosts,  making advertising domains in your own PC (127.0.0.1), making this the browser search advertising on a web server on your computer BUT, as we have no web server, then just do not show anything.

For example, to block Google advertising I run the following in a terminal:

sudo echo "127.0.0.1 ad-ace.doubleclick.net" >> /etc/hosts
sudo echo "127.0.0.1 ad.es.doubleclick.net" >> /etc/hosts
sudo echo "127.0.0.1 googleads.g.doubleclick.net" >> /etc/hosts
sudo echo "127.0.0.1 pagead2.googlesyndication.com" >> /etc/hosts
sudo echo "127.0.0.1 pubads.g.doubleclick.net" >> /etc/hosts

Once done, close the browser and gain access to a site that has Adsense type advertising, and will not see :)

If you use a proxy server then you must add in your browser to use the proxy NO to these aforementioned domains, or block these domains directly on the proxy server if administered for you

My list of domains in / etc / hosts is rather extensive, for sites that promote (as well as. Unnecessary js) there are many, frequent sport sites. In addition to normal, other sites, I leave my list here:

#### Blocked Adds ####

127.0.0.1 activate.tapatalk.com
127.0.0.1 active.cache.el-mundo.net
127.0.0.1 ad-ace.doubleclick.net
127.0.0.1 ad.amgdgt.com
127.0.0.1 ad.es.doubleclick.net
127.0.0.1 ads.ad4game.com
127.0.0.1 ads.mcanime.net
127.0.0.1 ads.redluckia.com
127.0.0.1 aimfar.solution.weborama.fr
127.0.0.1 anapixel.marca.com
127.0.0.1 apis.google.com
127.0.0.1 b.scorecardresearch.com
127.0.0.1 bs.serving-sys.com
127.0.0.1 cartel.cubadebate.cu
127.0.0.1 cdn.amgdgt.com
127.0.0.1 connect.facebook.net
127.0.0.1 cstatic.weborama.fr
127.0.0.1 engine.adzerk.net
127.0.0.1 es.ign.com
127.0.0.1 estaticos.latiendademarca.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 images.eplayer.performgroup.com
127.0.0.1 impes.tradedoubler.com
127.0.0.1 js.revsci.net
127.0.0.1 media.fastclick.net
127.0.0.1 openx.fichajes.net
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 platform.twitter.com
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 scdn.cxense.com
127.0.0.1 scorecardresearch.com
127.0.0.1 static.batanga.net
127.0.0.1 static.eplayer.performgroup.com
127.0.0.1 vht.tradedoubler.com
127.0.0.1 view.binlayer.com
127.0.0.1 www.google-analytics.com
127.0.0.1 www.googletagservices.com
127.0.0.1 www.marcamotor.com
127.0.0.1 www.weborama.com
127.0.0.1 www.wtp101.com

This solves almost all of my problems, as I have checked the html sites I frequent to detect. Js or advertising that do not want my browser loads, hence I took these to block domains or subdomains.

What are the advantages and disadvantages of this method compared with others like Adblock?

The main disadvantage of this method to show them with Adblock, Adblock is being updated constantly, or because the plugin know which domains are to be blocked, while doing so in this way I showed you, must add domains or subdomains to your /etc/hosts

The main advantage that I see to this method is simple, it works for me all, absolutely all browsers I have or will have in my computer. Also, I usually use the Alpha version of Firefox, with this method I avoid that plugins (like Adblock) tell me they are not compatible with my version of the browser, etc.. Oh by the way, I’d rather be the one blocking the sites, call me crazy but I do not like the idea that a content plugin crash my browser, I prefer to be the one who controls this :)

Anyway, I know many would you label me selfish because blocking advertising (and advertising benefits authors of these sites), but it happens that my internet connection is really very very slow, I can not spend bandwidth on uploading images or advertising certainly does not interest me, which I will not click.

Here ends the post, I hope you have found it useful.

Regards,
Usman Sher

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>