Tech Xpress

How to Block Websites

Worried about your kids surfing habit? Here are a few ways to block access to sites from your computer. These methods aren't very difficult to circumvent. But nevertheless, it provides a first line of defense for you to protect your kids.

Block Websites using Windows HOSTS file

Windows HOSTS file can be used to completely deny access to a website from a computer. Here's how it can be done -

1. Locate the HOSTS file.
In Windows XP and Vista it is in C:\WINDOWS\system32\drivers\etc\
In Windows 2000 C:\WINNT\SYSTEM32\system32\drivers\etc\
In Windows 98 and ME it is in C:\WINDOWS\

2. Open it in Notepad and find the line localhost at the bottom. Add the following lines below it.

The above lines will block facebook and orkut. Include sites with and without "www". Try all possible combinations for accessing the website and enter them in the list; for eg, to deny access to yahoo websites, see the list below. (use your regional yahoo domain here like, "in" is for India, "mx" is for Mexico etc)

3. Save the file.
This will block the entered sites from being accessed by any browser from your computer.

4. To restore access, just delete the lines.

Block Websites in Firefox

Firefox has a nice addon, BlockSite, which can be used to block sites. The obvious disadvantage is, it only works with Firefox. So if Firefox is the only browser installed in your machine, this should be enough.

Conclusion: The advantage of using the HOSTS file is its simplicity and no additional software is needed. As I said before, these methods can be circumvented. If you are very serious about this, consider using commercial third-party software.
Sites can also be blocked with OpenDNS, your router settings, or with third-party software. These are more advanced which I'll try to cover later.

posted by Vijeesh Ravindran, Sunday, August 30, 2009