Thursday, July 20, 2006

Annoying ad service terminated...

Today I surfed the net and came across a site that had an image that the Adblock extension for Firefox could not block. What to do? Well, I used a "hack" I remembered that I also used on my Linux PC. The site I wanted to block was ad.doubleclick.net. Now, what I am about to write about now is quite technical, and following this tip is entirely at your own risk, I accept no responsibility for anything which might happen if you use this tip, even if you break your system ;) Ok, now that part is over and done with, so this is what I did:
  • Start Terminal
  • Type sudo -s
  • Give your root user password and press the Return key.
  • Edit the file hosts file in /etc/ with the following command nano -w /etc/hosts
  • Add the following line at the end of the file:
    127.0.0.1 ad.doubleclick.net
  • Note that the space between 127.0.0.1 and ad.doubleclick.net should be a tab space not a regular space character. Blogger doesn't allow inserting tab characters it seems, even though I used the pre formatting HTML tag.
  • Press the key combo CTRL X
  • Press the key y
  • Press the key Return (remember not to alter the name of the hosts file as the hosts file is a critical systemfile).
  • Quit Terminal, and restart Firefox.
  • This tip will work for any annoying ad service out there or any other site for that matter you wish to block that Adblock or any other blocking extension out there is not able to block.
There you have it fellow netsurfers, those pesky irritating ad services terminated once and for all. Oh, there might be a problem with this solution though. If you are running a webserver (Apache) on you Mac and it responds to calls on port 80, you may have to edit your httpd.conf in order to tell Apache that it shouldn't listen to the localhost IP 127.0.0.1.

This site has a more detailed and extensive hosts file for you to download and install. Although there may be some extra steps needed to do in order for it to work properly. Good surfing, everyone.

0 Comments:

Post a Comment

<< Home