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 −


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 here −
After typing, press TAB and then type the name of a website you want to block − 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. in our case.
To unblock the website, just delete the line and Save the Notepad.