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