How to Use the Registry to Block Websites
By Jeff Grundy
Allowing your employees to use Internet can help increase productivity and provide near instant access to communications with customers and suppliers. Nevertheless, there may be certain websites to which you want to block access in order to keep employees focused on more important tasks. For instance, you may want to block access to certain social networking or entertainment sites to help your workers resist the temptation of visiting such sites during business hours. While there are many methods you can employ to block access to websites, using the Windows registry to restrict access is one of the most effective for Internet Explorer users.
Move your cursor to the upper right corner of the monitor screen. Click the “Search” icon on the slide-out menu.
Type “regedit” into the search box, and then click the “Regedit” program link in the search results. The Registry Editor window launches.
Select “HKEY_CURRENT_USER | Software | Microsoft | Windows | CurrentVersion | Internet Settings | ZoneMap” in the left navigation of the Registry Editor window.
Right-click the “Domains” subfolder under the ZoneMap folder in the navigation pane. Click “New” on the pop-up list, then “Key.” A new key named “New Key # 1” appears under the domain name key you created.
Right-click the “New Key # 1” key folder and click “Rename.” Rename the key to the domain name of the website to which you want to block access. For instance, if you want to block access to Facebook, enter “http://www.facebook.com” and press “Enter.”
Right-click the new domain name entry you created under the Domains folder. Click “New,” then “D-WORD (32-bit) Value on the pop-up list. A new key named “New Value # 1” appears under the Default key in the right pane of the Registry Editor window.
Rename the key to with a single asterisk “*” character and press “Enter.” This will restrict access to all subdomains of any domains you wish to black list.
Right-click the “*” key and click “Modify” on the pop-up list. Change the default value in the “Value Data” box from “0” to “4.”
Block access to additional websites by creating new keys under the Domains folder in the right navigation pane of the Registry Editor window. Block access to sub-domains of any entered domain by creating a D-WORD (32-bit) Values named “*” as needed.
Close the Registry Editor window and open Internet Explorer. Enter the domain name of a blocked website into the Address Bar and press “Enter.” Internet Explorer displays an error indicating that the website cannot be displayed.
The above solution blocks access to websites only for users of Internet Explorer. If a user uses other browsers, such as Chrome or Firefox, they will still be able to access websites blocked in the registry. If you want to block access to websites from all browser applications, use the Windows HOSTS file. You can find the Windows HOSTS file in the “C:\Windows\System32\Drivers\etc\hosts” folder. Open the HOSTS file with Notepad, and enter the website to which you want to block access beneath the last line of default text in the editor window. For Instance, to block access to Facebook from all browsers, enter “127.0.0.1 facebook.com” and save the file. After saving the entry in the Windows HOSTS file, no one using the computer can access the listed website from any browser.
Jeff Grundy has been writing computer-related articles and tutorials since 1995. Since that time, Grundy has written many guides to using various applications that are published on numerous how-to and tutorial sites. Born and raised in South Georgia, Grundy holds a Master of Science degree in mathematics from the Georgia Institute of Technology.