How to block a website from the Windows HOSTS file

How To Block A Website From The Windows Hosts File

The Internet is a very various place with a lot of academic and leisure content material in all its shapes and colours, which is nice. However, there are lots of net pages that may be distracting at sure instances and even harmful.

Fortunately, Windows has a small file referred to as “HOSTS” that permits you to block particular web sites in your laptop. Next, we clarify the way it works.

How to block a net web page in Windows by modifying the HOSTS file

The HOSTS file is a configuration file present in your Windows working system that incorporates a record of IP addresses and domains. When you strive to entry a website, your laptop first seems to be in the HOSTS file to see if there’s an IP tackle related to that area title. If it finds it, your laptop goes immediately to that IP tackle as a substitute of looking the Internet for it.

To block a particular website, you simply want to add the website tackle to the HOSTS file. and affiliate it with an invalid IP tackle, reminiscent of This will make your laptop unable to entry the website, because it won’t be able to discover a legitimate IP tackle.

Here is the course of to block a website in Windows from the HOSTS file:

  • Click Start and kind “Notepad” in the Windows search field. Click on the Notepad icon to open it, however accomplish that by selecting the choice “Execute as an administrator«.
1674218375 714 How To Block A Website From The Windows Hosts File
  • Click on File>Open. Navigate to the following path: C:WindowsSystem32driversetc.
  • Select the file «HOSTS» and click on Open.
1674218376 963 How To Block A Website From The Windows Hosts File
  • Add a line to the finish of the file with the IP tackle “” adopted by a area and the area title of the website you need to block. For instance, if you need to block Facebook, you’d add the following line to the file: “”.
1674218377 405 How To Block A Website From The Windows Hosts File
  • save the file and shut Notepad.
READ :  5 Worst Games in the World 2022

After doing this, the particular website that you’ve blocked won’t be accessible from your laptop. However, it will be significant to word that this system solely works in your particular person laptop and doesn’t have an effect on different gadgets related to the identical community.

1674218378 943 How To Block A Website From The Windows Hosts File

Also, some web sites could use totally different subdomains, so it’s advisable to block every of them to forestall entry to the website from being potential. For instance, Facebook has its personal subdomain for its Spanish model, subsequently, we’d even have to add the subdomain “” in the hosts file for the blocking to be actually efficient.

From right here, we will add all the net pages that curiosity us by following this identical technique, including a new line in the HOSTS file for every new net that we would like to block in the system.

Maybe you have an interest in:

See you in the subsequent submit!

Leave a Reply

Your email address will not be published. Required fields are marked *