Blocking Websites With the Hosts File
A lot of software cracks will usually allow you to run an application which edits your hosts file, usually in an effort to block your computer from accessing the software’s registry server. However, many of these hosts-patching programs have problems or downright fail at editing the hosts file for certain Windows operating systems. The good news is you can patch the hosts file yourself, as long as you know the URL of the site you wish to block or redirect.
Editing the Hosts File (Windows 7)
- Click on the Start (Windows) button
- Click on Computer
- Navigate through Windows Explorer through the following folders:
- In “etc” folder, select the hosts file and copy and paste it to your desktop.
- Double click on the hosts file in your desktop
- Select to open it through Notepad
- Make edits to it in Notepad
- Save using Ctrl+S
- Drag and drop the hosts file back into the “etc” folder
- Select “move and replace file” to overwrite the original file
Your hosts file should look something like this:
To block a website, you simply add the following to the bottom of the hosts file in Notepad:
So if I wanted to block MySpace, I would type:
And then I would get this if I typed myspace.com into a browser:
It will not load the page until I change the hosts file. A lot of people who pirate Adobe software will patch the host file in this same fashion, typing:
You can patch your hosts file for entirely legal reasons too. Many people will edit their hosts file to block bad or unwanted websites that could harm their computer. In fact,here is a long, extensive list of bad websites that are already prepped to be blocked in your hosts file. Simply download the text document, copy the blocking website codes, and paste it into your hosts file.
However, be sure, if using one of these lists of designed to patch your host file, that all the websites are preceded with the code: 127.0.0.1. That’s an IP address that defaults to nowhere. Just a blank page. If there is any other IP address in the code, don’t trust it. It could be redirecting you to bad sites filled with viruses and terrible things for your computer.
Mariana Ashley is a freelance writer who particularly enjoys writing about best online colleges. She loves receiving reader feedback, which can be directed to mariana.ashley031 @gmail.com.