Two Easy Ways To Block Websites

block websites using content advisor

The decision to block websites is an important one if you have children. 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 Websites 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: Localhost

In order to block websites such as Facebook, you would add the following below that: Localhost

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, 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 block websites 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.

11 thoughts on “Two Easy Ways To Block Websites”

  1. 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?

  2. 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!

    1. 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.

      1. I am trying to block a website without anyone else knowing and when I do the above – run as administrator (this is my laptop and so I am the administrator) it comes up with message – do you want to let the computer make changes – is it safe to say yes and if so will it show I have made changes somewhere…

          1. I would look into OpenDNS and block the websites at the router level. Create a free account and make a DNS change on your router. After that, login to OpenDNS at their website and there’s a place there where you can block sites.

          2. Thanks Dave but I am not a techie and to be honest do panic when i get messages pop up!!! W wouldn’t know where to start on the opendns either….. i just want to use my computer without doing the hard parts….!!!


  3. Neither of these two methods are easier than using OpenDNS. In fact according to the comments I’ve read here, editing your hosts file isn’t really that easy. With OpenDNS you can pick a basic template and then add to the white list or black list as you want. Since it installs on your router, you don’t have to worry about someone using your connection for something you don’t want, even if they bring their own laptop. And you don’t need to “mess with your router settings” it does it for you, in most cases. Since it’s free, I don’t understand why you would bother trying to edit your hosts file.

    1. We have articles on OpenDNS on this site. We love it. As long as you have the expertise and ability to update your router’s DNS settings it’s yet another great option.

  4. Spybot Search and Destroy at has a Hosts feature that makes it easy to add websites to the blocked list in hosts. The program has a prepared list of sites known for bad behavior, which you cad add, as well as whatever other site you want to block.
    In addition, this program is well-regarded for finding and destroying spyware, malware, adware and other malicious software.

Leave a Comment

Scroll to Top