The hosts file is a small text file that sits in your computer and tells your programs where to go when you type a URL into your browser. The hosts file is one of the lesser known but more effective tools for securing your computer and protecting your children from malicious websites (or any website for that matter).
Without going into great detail, I need to explain how your browser knows which location on the internet to go to when you type in a URL. Say you type www.thegaap.net into your browser or you visit it through a link. Your computer needs to know what server is storing the website files. The first place your computer looks is the hosts file. Wherever the hosts file tells your computer to go, it goes. If no information about the site is included in your hosts file, your computer searches various Domain Name Servers (DNS) on the internet and away you go.
Every Windows PC has what is called a loopback address. This is the address of your local computer. You may be familiar with the IP address 127.0.0.1, this is localhost. All one has to do to avoid a website is make an entry in the hosts file saying that any time a program references a specific website it goes to the loopback address 127.0.0.1. It’s that easy. The hosts file is buried in the windows system folder.
Here are the various paths:
Windows XP - C:\WINDOWS\SYSTEM32\DRIVERS\ETC
Windows 2K - C:\WINNT\SYSTEM32\DRIVERS\ETC
Win 98/ME - C:\WINDOWS
Here is a sample entry in the hosts file (the file always starts with ‘127.0.0.1 localhost’):
127.0.0.1 localhost
127.0.0.1 www.popuppadlock.com
127.0.0.1 www.givemeyourcreditcardnumbersoicanstealyourmoney.com
When you type www.popuppadlock.com into your browser, you will see a “page cannot be found” message. This is because your computer obviously does not host that website. You can do this with any website you please (not just the malicious ones). Another very strong feature of the hosts file is that windows uses the hosts file for all programs attempting to use the internet. This means that if you have a lapse in your anti-spyware software and a malicious program is installed on your computer, an up to date hosts file will prevent it from communicating with an outside website.
There are so many bad websites out there and it would take you forever to populate a hosts file even if you knew them all. It’s a good thing that there are some good guys out there that maintain an up to date file.
Visit:
http://www.mvps.org/winhelp2002/hosts.htm
Follow the instructions on the page and you will be up and running with a computer that is much more safe and secure. Remember that you can add whatever site you want to your hosts file.
If you have any questions or would like to know more about Windows security, visit me at www.performancewebdesign.ca/contact.html and leave me a message.