The local hosts file trick
Monday, 30 January 2006
There’s a old but effective trick to block those annoying ads, banners. cookies and hijackers. When your computer makes a TCP/IP request, it first attempts to use your local hosts file before it looks at any public DNS servers, so it can translate the nice (human readable) domain names to numeric IP addresses.
The idea is to use this file to “map” any website you want to block to an “internal” address, thus making your browser think the data actually sits on your own computer, instead of the server you’re trying to block.
The hard-working (but knowledgeable) volunteers at MVPS have a regularly maintained hosts file, which you simply download and copy to the appropriate directory.
If you’re running Windows XP, the file should be /windows/system32/drivers/etc/hosts. If you’re running Windows 2000, it should be /winnt/system32/drivers/etc/hosts instead. Note that the file name is “hosts”, not “hosts.txt” or any other extension. If you want to know more about the trick, read the Blocking Unwanted Parasites page. Users of other operating systems, please see this entry from Wikipedia.
The current version blocks some 10,000 dire, distasteful, and dodgy hosts.
|