Editing the Hosts File (Windows 7)
- Click on the Start (Windows) button
- Click on Computer
- Navigate through Windows Explorer through the following folders:
- C:/
- Windows/
- System32/
- drivers/
- etc
- 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
Blocking Websites
To block a website, you simply add the following to the bottom of the hosts file in Notepad:
127.0.0.1 siteyouwantblocked.com
127.0.0.1 myspace.com
And then I would get this if I typed myspace.com into a browser:
127.0.0.1 activate.adobe.com
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.