Windows

adblock software for geeks


Chances are excellent that even with a clean install you basically have adblocking software already installed on your computer.  This applies to both Windows and free unices such as Linux or FreeBSD.

All you have to do to make use of this is add one simple line to a text file.  The file, in all(?) cases, is called hosts.  On a Windows XP system, it should be located at C:/WINDOWS/system32/drivers/etc/hosts and on Linux or FreeBSD at /etc/hosts instead.

First, you need to know an advertiser's domain name.  This is pretty simple to accomplish: just configure the preferences in your browser to ask you what to do every time a webpage tries to set a cookie.  On Firefox, for example, you would ensure that the Accept cookies from sites chekbox is checked, and the Keep until: dropdown list is set to ask me every time.  Then, when it asks you if you want to accept a cookie from a domain like ad.doubleclick.net you will know the name of the enemy.  Just make sure you don't do this for the domain of the website you're actually trying to visit, such as http://www.techrepublic.com or sob.apotheon.org.

What you do with that URL (let's continue using ad.doubleclick.net as our example -- it's probably most geeks' favorite advertiser to hate) once you have it is easy.  Just add a line like this to your hosts file:

127.0.0.1    ad.doubleclick.net

It's that simple.  I have a line exactly like that in my own hosts file on this computer, running FreeBSD.

This works because your computer (using something like Windows or FreeBSD) normally uses DNS to resolve hostnames to IP addresses, but if there is an entry for a particular hostname in the hosts file, that takes precedence.  127.0.0.1 is the localhost address -- it just points right back at your own computer.  Thus, when a website tries to insert content from an advertiser with the hostname ad.doubleclick.net, your computer will resolve that hostname to the localhost IP address instead of what the DNS servers say it should be.

(note: pretend those forward slashes in the Windows path for the hosts file are backslashes) 

About

Chad Perrin is an IT consultant, developer, and freelance professional writer. He holds both Microsoft and CompTIA certifications and is a graduate of two IT industry trade schools.

5 comments
Bill Ward
Bill Ward

If you are using a DNS server (such as, for example, a DNS proxy server setup on a firewall... IPCop, or Smoothwall, for example), a better way is to update the hostfile on the FIREWALL.... then ALL of the computers on your network are instantly protected. Of course, with Firefox and the Ad-Blocker add on, you can just mark the offending ad to be blocked, changing the full URL to the domain. However, please think about one thing before you do that.... Sites like CNet, Tech Republic, ZDNet, Yahoo, etc., all rely on AD REVENUE to be able to pay for the wonderful content that we use for free everyday. Folks like (for example) our very own Trivia Geek depend, in part, on the advertising revenue of these. And if you block by domain, no "hit" occurs to mark up the fractional cent that each page view brings up. And the authors, workers, and good people who bring us these articles don't get paid. Big Trivia Geeks end up getting laid off, and little Trivia Geeks go hungry, without Star Trek to watch (no money=no cable). So, before you get too block happy, think about this: How much value do you get from the website? How intrusive is the advertisement? Can I block tracking, but still keep agregate ad page impressions high enough that those who do this for our enjoyment can keep their livelihood?

Jaqui
Jaqui

don't allow images to load. they still get the impression moneys. you don't have the gods awfull ad in your face. that's why I like lynx, no clientside scripting capability, no images capability, no tables capability, no frames capability. just plain old content. which is all I want on a site. it's really to bad TR broke any functionality with lynx. danged javascript navigation and posting..whoever thought it was a good idea should be shot.

Roger99a
Roger99a

What you should block is malware. You can get a hosts file at http://www.malware.com.br/ or at some other places. A script in your AD Group Policy can relicate it throughout your network on a regular basis.

Tony Hopkinson
Tony Hopkinson

See if they are less intrusive with the new layout. Start getting in my face again though ... Remember it's my pixels and my bandwidth and I reserve the right to make the judgement on whether I'm getting value for money. The old site, nearly 4O% of the used screen space was ads of one form or another. There might have been some good content, but I fell asleep waiting for it to load.

stress junkie
stress junkie

I'm talking about the Tech Republic equipment, not yours. :D

Editor's Picks