Home / Tutorials / Security / How to block websites using the hosts file.

How to block websites using the hosts file.

Due to the huge increase in the number of Internet users, and the huge list of websites that exist on the internet and contains a lot of data and information, and nowadays every house contains several desktops, laptops and mobiles,  and all are connected to the internet and accessed by kids, teenagers, and old people.

And due to the high risk of not monitoring your kids in accessing the internet. and preventing them from accessing danger websites like pornographic, drug related and so on.

for that, it’s very important to monitor and control internet access for your kids.

There are a lot of methods for monitoring and controlling websites in your home, some are complicated and advanced methods that needs experts and maybe some advanced software, and there are some basic methods that you can start with.

in this article, I will show you a very simple method that you can use to prevent access to certain websites on your computers.

The method is as follows :

  1. Open my computer.
  2. Open the drive holding windows ( C drive is used usually).
  3. navigate to the windows folder.
  4. Open system32 folder.
  5. Search for “etc” folder in the system32.
  6. In the etc folder we have a file called “hosts”, we have to open the file using a text editor like notepad.
  7. In the file go to the last and end the following line :     websiteyowanttoblock


and add any websites you need in this way.


Important note: Open notepad as an administrator in order to open the “hosts” file.

Did you find this helpful ?


User Rating: Be the first one !

About Hassan abou lhassan

Check Also

How passwords are cracked by hackers?

In this topic, I will show you several methods used by most hackers to hack …