Sections

Main/Advocacy




Main
Recent Changes Printable View Page History RSS Feed Edit Page
Ad Free Browsing

If you are like me, you'd prefer to see fewer ads when you browse. Depending on whether the web site designers specify a specific width=# and height=# for the banner images, you may or may not see the familiar "broken image" icon. In either case, you won't be distracted all the time with advertising.
  • First you edit your /etc/resolv.conf file so that it specifies that the domain name resolution sequence is: local /etc/hosts file first, domain name server second. This is accomplished by adding the following line to your /etc/resolv.conf file:

    hostresorder  local bind

  • Next, you need to find the names of some hosts that are delivering the ads you want to block. Fortunately, most so-called content providers who use advertising subcontract their ad-image delivery to companies like doubleclick, so the fact that an image is an ad can often be identified by the hostname that delivers it. The way to find out what host an image comes from is to use (under Netscape) the "View image" (right click on image) option. When you are viewing the image independent of its original HTML context, you will be able to read the name of the host it came from. Often it is one of a few large ad-delivery companies.
  • You will need to find some IP numbers to associate with the these ads.somecompany.com server names. By associating the wrong IP number with the name, and telling your domain name resolution system to work primarily from the local /etc/hosts file, you will be preventing the images from being found. You could use just about any IP address that will point to a functioning web server. But why just choose random IP numbers? Why not cross-map the IP addresses to other ad-delivery sites? So far, I don't think it's illegal to make HTTP requests for non-existent documents every once in a while.

    Doc Not Found <-- 4 ----------------------------------+----------+
                                                          | qAds.com |
 1 GET q.gif from qAds.com          3  GET  z.gif  img ->| web      |
            \                    /                      | server   |
              - >               /                       +----------+
                2  /etc/hosts -+
              - >               \                       +----------+
            /                    \                      | zAds.com |
 1 GET z.gif from zAds.com          3  GET  q.gif  img ->| web      |
                                                        | server   |
    Doc Not Found <-- 4 ----------------------------------+----------+

  • If you don't know the IP address of your "favorite" ad deliverers, use:

      nslookup somehost.com

  • The IP number associated with the hostname must resolve to a real server, otherwise, the failure of the server to respond will likely slow down your browsing.
  • My /etc/hosts includes the following mappings:

207.46.131.137 m.doubleclick.net

207.46.131.30 ad.doubleclick.net

207.46.130.149 ads05.focalink.com

205.188.146.23 ads.tucows.com

204.162.96.173 ads.lycos.com

Unfortunately this technique has not worked as well since sites like the NY Times began delivering their news photos with the same servers as the ads.
Page last modified on June 01, 2004, at 06:23 PM