From Pine View Farm

A HOSTS File Is a Wonderful Thing 5

It leaves big holes in my browser where the ads should be by redirecting advertisers like DoubleClick to look for their ads on my own harddrive, where, of course, they ain’t.

I use this one, which I learned about here. (Karen, this site is an excellent site for help with Windows in plain English.)

The same HOSTS file works on both Windows and Linux.

In Windows XP, it goes into C:\Windows\System32\Drivers\Etc. The link explains where it goes in other flavors of Windows.

In Slackware Linux, it goes in the root of /etc. Linux users, be careful to copy the contents of your default host file identifying your computer name as into the HOSTS file (it should already have line identifying “localhost” as For other flavors of Linux, consult your local distro.

Be a good host. Get a HOSTS file and make those ads go away.



  1. Phillybits

    February 4, 2007 at 8:15 am

    I love my HOSTS file. It’s enormous but what I like even more is my Firefox browser, although lately, it’s having it’s own problems.

  2. Karen

    February 4, 2007 at 10:23 am

    Ok, call me ignorant. I’ll look at it again later, & MAYBE it’ll make sense, then. At first glance, it appeared to be in a foreign language.

  3. Frank

    February 5, 2007 at 6:54 pm

    Phillybits, get Opera. Learn about a browser that rocks.

    Karen: All of us were ignorant once. If it weren’t for ignorance, we wouldn’t need trainers, and then where would I be?

    Here’s how I understand a HOSTS files work–Opie or Phillybits might be able to explain it better.

    When you hit a URL (web address), your computer looks first in the HOSTS file. If it finds the URL ( in the HOSTS file, it goes to the address it finds there. If it doesn’t find it in the HOSTS file, it goes into the big wide world.

    Now, what the advertisements do is embed URLs in the webpages. So when you go to, any advertisements at that site try to go to their URLs ( and load their ads as part of the page you are looking at.

    (Just like pictures load as part of the page you are looking at–pictures are not part of the page. Rather, the page contains links that say, “Load this picture here.”)

    Your browser goes looking for the URL. It looks first in the HOSTS file.

    So, by putting advertising links in the HOSTS file and saying they can be found at (which is pretty much a universal convention for “this here computer you are typing on right now”), a HOSTS file cause your computer to look for the link on the local computer. And it’s not there.

    So the browser finds nothing and either shows a hole where the ad should be or shows an error message (“file not found” or “this page could not be opened” or something like that).

    Either way, you don’t have to look at the ad. And the advertisement trackers don’t get to track where you are going.

  4. Karen

    February 5, 2007 at 7:49 pm

    How big is this kind of file? I saw a mention of that, & I appear to have space issues anyway, even though it says I have a bunch. Slow moving, that is.

  5. Frank

    February 6, 2007 at 7:46 pm

    Mine is about half a meg. Shouldn’t be a space problem on a modern computer.