block certain websites from browser
I want to be able to open "example" from my computer, but I don't want to be able to open "www.example.com". Is this possible?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You'll want to add it to your "hosts" file to block it:
Add it to your hosts file: 127.0.0.1 facebook.com
This should prevent your browser from doing a DNS lookup on the site, and instead point it at your computer's loopback address. If your computer is running IIS and has a default website, you'll get that, if not you will get an error that the page cannot be found/displayed.
Open the "hosts" file in C:\Windows\System32\drivers\etc with Notepad (Windows 7). At the bottom of the text on a blank line add "127.0.0.1 www.example.com" without the quotations and then save the file. When you go to www.example.com it should no longer work. http://www.timeatlas.com/term_to_learn/general/taking_control_with_the_hosts_file
You can add a line to your hosts file. This file is located in:
Open it with notepad and add lines like so:
127.0.0.1 example.com 127.0.0.1 Facebook.com
Make sure that you do not rename the hosts file when you are saving it. It is normal for it to have no extension.