Q: Is there an easy way to block access to selected websites without having to go to the trouble of installing control software on the PC? I simply want to prevent some sites being used on office machines. They’re using Firefox 3.5 as the default browser. Thanks in advance for your help.
A: The simplest way of blocking access to a small number of known sites is to make entries in the Windows Hosts file. The file is located at C:\Windows\System32\Drivers\Etc\Hosts. Open this with Notepad and for each site that you want to block add a line like this, 127.0.0.1 www.website.com replacing the last part with the address of the site you want to block. The 127.0.0.1 IP address is a local loopback which makes your PC think the site is located on your system rather than the Web and will therefore report an error when the URL is entered. If you want to be really clever you can install IIS (Internet Information Server) software on the local PC and display your own customised local page saying that the site requested is unavailable. Note that when you come to save the edited hosts file you won’t be able to directly overwrite the original. Save your revised copy as hosts.txt, then navigate to the folder, delete hosts and rename hosts.txt to remove the extension.
Adding entries to the Hosts file is how programs like SpywareBlaster (www.javacoolsoftware.com) block malicious sites. It also has the advantage of working across all browsers so you can’t get around it by switching to Internet Explorer or another alternative. A different approach is to install a Firefox plug-in like LeechBlock (www.proginosko.com/leechblock.html) which allows you to build a list of blocked sites. This allows greater flexibility because it lets you block sites at certain times – you can allow access to social networking sites during lunchtime for example – and also has the ability to override the block by entering a password should you need to.
Originally featured in PCU123
