How to use the hosts file in Windows
The hosts file is a handy thing that very few people know about. You can use it to block ads and keep your computer away from malicious websites.
What the hosts file is, is sort of like a directory for your computer. It's not really used very much because people dont really have to type in IP addresses for servers most of the time because of DNS. But what it's handy for is puting a domain in there and pointing the computer to the localhost, this effectively blocks ads because when you're web browser asks for the ad, it doesnt find it because it thinks the domain for the ad is on your local computer ,the hosts file I installed today blocks ads that ad blocker plus fails to block.
in Windows XP the hosts file is located in the C:\windows\system32\drivers\etc folder. If you can't see it, turn off the hide system files thing in folder options. Another way to find it is to use the search function in windows to search C:\windows for "hosts" (with out quotes).
If you want to use hosts to block ads, you must download a hosts file with all the addresses and copy it over your hosts file. Just in case you want to go back to the way things were before, rename your hosts file to hosts.bak before you go and copy the new one there over it.
A good hosts file can be downloaded at this website
http://www.hostsfile.org/hosts.html though I've saw sites with their own hosts file thats intended to block ads, too.
If you open the hosts file you'll notice that all the domains are pointed to the IP 127.0.0.1 that's the ip that means to the computer local host. So your computer will never download those ads, the computer will think those ads were on your computer and not download them, since they arent there to the computer.
another neat thing you can do with the hosts file is block certain websites. Ever browse to a nasty website with popups and had to kill the browser through task manager? Those nasty websites have a tendancy of popping up in google a lot and you might forget about that nasty website. So next time a website does something malicious add it's domain name to your hosts file and point your computer to the local host IP like you did with the ads. Now if you ever run into that website again your browser will be brought to a page that says it couldnt connect to the website. an example of this is I added facebook in there, because there's links everywhere pointing to Facebook and I never want to see it again, so out of spite I put facebook's domain name into my hosts file and pointed my computer to local host. Fuck you facebook =P