How to block access to a site on your PC without software?

how to block access to a site on your pc without software
how to block access to a site on your pc without software

Do you want to block access to certain websites on your computer? There is a very simple way to do this. No need to install any software, just edit the “hosts” file on your computer.

This file is located in the system folders of your PC. It allows each site to be linked to its IP address when you browse the internet. This tip applies to all versions of Windows, and to all browsers installed on your machine.

To edit the host file and block access to certain websites on your computer, go to the “ Windows", Then in" System32" , In " Drivers » and finally in the folder « etc " ;

Then open the file named “hosts” with notepad. You are then presented with a small text, each line of which is preceded by a “#”;

To block access to a website, add a line below and enter the address of the site you want to block in this form: 127.0.0.1 www.address-of-the-website.com. You can define other sites to avoid by adding them in succession, separated by a space, not forgetting to add 127.0.0.1 in front of the address each time.

For example to block access to Facebook, just add the following lines

127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 b.static.ak.fbcdn.net

The 127.0.0.1 corresponds to the local address of your computer, it is on it that you want to block Facebook.
Next comes the address of the site to be blocked, separated from your local address by at least one space.

Finally save the file with your changes. Congratulations! These sites will no longer be accessible, an error message will appear in the browser.

To unblock them, edit the hosts file again and delete the addresses you want to make available.