Two Easy Ways To Block Websites

Blocking access to websites is important if you have children or if you have PC that is used by a lot of different people. There are numerous ways to restrict access to the Internet or specific websites. Some include modifying the router, changing your DNS settings or applying other filters. But we’re going to show you a couple of things to try before going to those great lengths. No matter what you do, however, the user account you want to block should be a  Standard User account, not an Administrator account. You would not want to give the user the ability to revert your changes.

Block Sites Using The Hosts File

Using the hosts file is a quick way to block access to websites no matter what browser is used. To add a site to the hosts file, you will need to open My Computer, then the C drive>Windows>System32>and then the etc folder. Double-click the hosts file. When asked what program you want to open, select Wordpad. You will see something like the following:

127.0.0.1    Localhost

In order to block a website, such as MySpace, you would add the following below that:

127.0.0.1   Localhost
127.0.0.1   www.myspace.com

Save and close the file. Try going to the website to make sure it has been blocked. If it has not, you may need to remove to tweak the address. This technique works great, as your browser will consult this file before trying to get out on the Internet. If it sees that the website points to 127.0.0.1, then it will loopback to your computer and generate a “Page Cannot Be Displayed” error. You can have as many entries in here as you want. The limitations to this technique is that there are a lot of websites on the Internet, and if you have young children you will want to block most of them.

Allow Websites Rather Than Block Them

The second technique is using the Content Advisor in Internet Explorer. Once this is enabled, you can allow or dis-allow any website you want. So if you have young children, you will want to allow websites as they need them and have all others blocked. To enable Content Adviser, open IE and go to Tools>Internet Options>and then the Content tab. Once you enable the advisor, you can click to allow whatever website you feel are appropriate for that user. You will also need to supply a password, so these changes cannot be undone by the user.

block websites using content advisor

How you lock down the Internet will depend on who uses the computer and how technical they are. The best way to restrict access is through altering the DNS provider and settings on the router.

4 Responses to Two Easy Ways To Block Websites

  1. Faith July 21, 2010 at 5:22 pm #

    I’m trying to block websites using the Windows/System32/etc folder and it says access denied or some other error messages. Can you tell me how to be able to block websites?
    Thanks

    • Dave July 22, 2010 at 9:49 am #

      Windows/System32/Drivers/Etc. You need to make sure you’re logging in under the admin account. Edit the Hosts file.

  2. Alicia August 21, 2010 at 1:45 am #

    Like Faith, I am also trying to block a website and I am using the Windows/System32/drivers/etc folder and when I get into the hosts file, it won’t let me edit or save. I have my own laptop and I am the only account on it and I am the admin account, but it still denies access. I read somewhere else that you have to uncheck the read-only box in properties and so I did that, but when I tried to apply the changes, it said that I need administrative permission or something like that. If you could help me in anyway to figure out what I am doing wrong or what I need to do to block a website, that would be great!

    • Dave August 21, 2010 at 9:03 am #

      Newer versions of Windows–like Windows 7–have tighter security. Modify the hosts file by going to Start>All Programs>Accessories and then right-click notepad and select Run As Administrator. In Notepad, navigate to that drivers/etc/ file and open the hosts file. Make sure the “all files” box is checked in notepad or it will only look for .txt files–and there will be none.

Leave a Reply