Wednesday 1 Apr 2009

Ad-block the sponsored links on search engines results pages

On every search engine, before or besides the natural results, some sponsored links are shown. They are close to your research, nevertheless they don't reflect the better sites to your request.

Moreover, the money paid by the advertiser on a click on these ads will go entirely to the search engine. And if you click on an ad, it's better to click when visiting a site (like this one), the benefit of the click will be shared between the ads seller and the webmaster (like me). :-)

adblock-plus

AdBlock Plus is a Firefox plugin to block ads, and other elements...

~

* It's useless to have very a long list for AdBlock. And avoid blocking the statistics tools, it lets believe that Firefox is less used than actually. I recommend the second list from AdBlock.free.fr which only blocks the ads. (If you do not use the 4 sites at the beginning/end of list, you can personalize.)

It's mainly used to block advertising agencies addresses, thus avoiding the banners on websites. The integrated blocker in Opera can make the same thing, but it does not allow such an advanced filtering, that we need to hide the commercial links.

AdBlock allows to block only certain elements of a page, like some paragraphs, or some tables, on a particular site or on all sites. And with the power of the regular expressions, the possibilities are infinite even with a very short list. *


For the sponsored links, we need to locate the corresponding HTML code. With Firefox, the thing is easier with the function "Source code of the selection" in the contextual menu. So we just have to select a little larger than the part to be blocked and to look at its source code. ;-)

There we must find class="..." and id="...", it's what we need to be able to select the element. AdBlock syntax is the site # the element (its class or id).

~

The result for sponsored links in some search results pages:

yahoo.com#div(id=right)
yahoo.com#div(class=bbox)
google.co.uk#div(id=tads)
google.com#div(id=tads)
google.co.uk#table(id=mbEnd)
google.com#table(id=mbEnd)
exalead.fr#a(id=i107)

To add line by line or to import via a text file containing these 7 lines.

For the search engine Exalead, the link a(id=107) is an annoying little link «My PC» appearing after page load. It links to a page to install a search tool on our own computer. The commercial links are sent by Google with the address http://www.google.com/afsonline/show_afs_ads.js that we can block too, but it's generally already done by other filters.


You can of course extend this method to block elements on other sites. The important thing, to block only a part of the page, is that you can locate the HTML element (‹div›, ‹table› or ‹a› here) with a class or id. It's not always possible.


café Did this article help you? 
Buy me a coffee!

One answer at “Ad-block the sponsored links on search engines results pages”

  1. 1
    A. said:

    Thanks, that's a great tip! I did not know it was possible to block class or id with AdBlock Plus.

The comments are closed.

Azure Dev