How to block a website for all Browsers in your PC

Blocking Website in PC Browser

This is the most common issue which largely being facing by PC users as they want to block a specific website on all of the browsers installed on their PC, to prevent themselves from any virus attack or to prevent other users to open a specific website on their computer.

Here I am going to provide you a trick through which any one can block a website for all browsers of a PC. Please follow below given steps.

Step 1- Go to C:/Windows/System32/Drivers/etc as shown below.

Note : In case if your C Drive does not contains installed Windows files then replace the drive C in above path with your Drive where Widows is installed on your PC.

WIndwos Explorer

Step 2 – Now copy the file hosts and paste it on Desktop.

Step 3 – Now double click on hosts file an open with dialog box will appear with list of applications. Select Notepad and click on OK button.

Open with dialog box

Your hosts file will get opened in Notepad as shown below.

Hosts File Content

Step 4 – Now go to the line as       localhost or ::1             localhost

Now place the cursor at end of line and press ENTER to start new line. type the name of the website which you want to block but remember you need to add “” before website name.

For Example – If you want to block then you need to type below line of text there.

See below pic for example.

Website Blocking

Step 5 – After making your desired changes just Save the file by pressing Ctrl + S  or click on File -> Save.

Step 6 – Now, copy the file and paste it at C:/Windows/System32/Drivers/etc  the same path from where it has been copied.

A Copy file dialog box will appear with the message that “There is already a file with the same name in this location.

See below pic.

Copy and Replace Windows Error

Step 7 - Now lick on Copy and Replace the first option. Old Hosts file will be replaced with your new modified file. 

Now to check if its working on not, just open any of your browser and try to open the website which just been blocked by you. You will see that your browser will not be able to open the website and will show error message. See below given example of Google Chrome.

Google Chrome Error Message