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 (, 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 (, 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 "" >> /etc/hosts
sudo echo "" >> /etc/hosts
sudo echo "" >> /etc/hosts
sudo echo "" >> /etc/hosts
sudo echo "" >> /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 ####

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.

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>