The HOSTS file is a computer file originally used to store information on where to find a node on a computer network. This file maps hostnames to IP addresses. If you didn’t know, you can use HOSTS file to block specific websites. Let’s say your son is wasting too much time in Friendster or MySpace website, you can easily block out these 2 websites by adding entries in your HOSTS file.
I got an email from someone asking me how effective it is using HOSTS file to block websites. So now I am going to show you how easy it is to block websites using HOSTS file and whether this method is effective or not.
HOSTS file is located in WINDOWS\system32\drivers\etc for Windows XP. You can edit the HOSTS file using notepad. If you prefer not to edit the HOSTS file manually, you can use a free tool called Any Weblock to block any website on your local computer. It works with any web browser and displays a fake error page. No network knowledge required to configure. You only need to know the domain/subdomain names of the websites.
For example, I’ll use Any Weblock to block Blizzard.com, the maker of the popular Starcraft and Warcraft game.

After adding blizzard.com domain name in Any Weblock, I tried visiting blizzard.com using web browser. It displays Internet Explorer cannot display the webpage.

It works!
Now the interesting part. How effective is this method used to block websites? Is there anyway to bypass this block? The error message generated by Internet Explorer is very general. There is no way that you’d know for sure that the website is being blocked using HOSTS file.
The first thing I’ll do when a website is inaccessible is I’ll use an online free services provided by DNS Tools to check if the website is up and running. Just do a port 80 and ping check is enough to determine whether the website is up.

I can see that port 80 is not being blocked and there is ping reply, meaning there is no problem with blizzard.com.
Now I can only suspect it’s either the problem with my ISP or my computer. I can call up my friend and ask if he has problems in browsing blizzard.com website. If he don’t have problems with blizzard.com website, then it’s definitely my computer or router. Most routers has the capability of blocking websites as well.
Do a “tracert” on blizzard.com will show me whether my HOSTS file is being compromised.

If it shows localhost 127.0.0.1 or any bogus IP address, it’s BUSTED! I’d check my HOSTS file immediately. If my HOSTS file is clean, it’s definitely my router.
For geeks like me, perhaps we know how to troubleshoot and find the fault. But for a person who doesn’t know much, he/she can also bypass the block easily by using proxy. I can use Anonymoused to open Blizzard.com webpage even though my HOSTS file is redirecting blizzard.com to 127.0.0.1.

Here are a few free proxy anonymous proxy servers. I am sure there are plenty around.
- http://www.privax.us/ (29 proxy sites)
- http://www.goproxing.com/
- http://anonymouse.org
- http://www.google.com/translate?langpair=en|en&u=www.raymond.cc
In short, blocking websites using HOSTS file works. It’s easy and you don’t need to install any software if you know how to manually edit the HOTS file. For computer geeks, bypassing this block is way too easy.
Related posts:
HOSTS files are superb! at blocking specific websites, domains and even specific pages on specific sites. They can be used to protect you from visiting infected sites, drive-by malware locations, etc. They can also be used to block specific ads and third=party content that slow down browsing.
An excellent source to learn more and to download regularly updated, pre-made HOSTS files can be found here: winhelp2002.mvps.org/hosts.htm
HOSTS files are superb at blocking particular websites, domains and even specific pages of specific websites. They can also be used to help protect you from visiting websites that are infected, have “drive by” malware installers, etc.
Here is a great (if not the best ) Web source to learn more and to download a pre-designed HOST file that is regularly updated: winhelp2002.mvps.org/hosts.htm
je suis algerien
You could also try implementing opendns.com and use their DNS servers. Then it will display that access to this site is not allowed.
If you block the anonymous proxies in your router firewall, you won’t be getting around this.
I have found that if the host file gets too big, it does slow down the performance of the system.
can you use a hosts file to block https sites?
Type in 66.90.92.246 to get on bebo myspace and more
if you are scared of being caught to browse a blocked site then use good proxy sites like( letmehide . com).I use it for hiding my sites from the school
[...] How Effective is Blocking Websites using HOSTS file? [...]
similarly proxy4free.com is useful
Raymond.cc is always help us by giving so may tips like this.
I also have turned into a fanatic of Raymond.cc
A nice stuff.
all of ur host r belong to us
Even phproxy.org is good
Nice 1 Raymond, Ur blog is the best . .
I’d never stop reading u . .
It’s a wise thing u’ve done by putting raymond.cc on all pictures, those copy cats will definately find another source . .
g2g, letme digg this thing ! ! !
Better freeware program to use with ur hosts file is “B.I.S.S. Hosts Manager”
You can also search easy in hosts file if you think a page is being blocked in the hosts file.
Im using this program for years now.
Mike.
That definitely should work with the kids, but not with us.
Love your blog, a fan from early 2006 and you actually inspired me with the straight forward tweaks.