How to block a website in your web browsers (Chrome and Internet Explorer)


To block a website on any of the web browsers like Google Chrome, Firefox, and Internet Explorer in a Windows system is quite easy. Follow the below-given steps to block a website −

Open Notepad as an administrator i.e. Run as Administrator.

Now, after opening Notepad, click on File, then click Open and move to the following path −

C:\Windows\System32\drivers\etc

The following files will be visible. Click hosts and open it in Notepad −

The notepad file will consist of some text. Reach the last line and press enter. Here, add the following to block any website and click Save to save the Notepad. We’re blocking www.facebook.com here −
After typing 127.0.0.1, press TAB and then type the name of a website you want to block −

127.0.0.1 www.facebook.com

127.0.0.1 is the loopback address to your own system. This line will return an error page in the web browser when someone tries to open the blocked website i.e. www.facebook.com in our case.
To unblock the website, just delete the line and Save the Notepad.

Updated on: 15-Jun-2020

202 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements