How to block website or IP Port in Windows


Step 1

Open “My Computer” and go to this location

Step 2

Find out the host files from there and right click on that that file using “Notepad”.

Step 3

Scroll your mouse, go to down of that page and find “ Localhost”.

Step 4

After that line, type the IP named “” and then URL of the website you want to block. For example,

Step 5

You can add as many websites as you want,the last digit of the IP like 2, 3, 4, 5, 6  etc.

Step 6

After putting all the restricted sites, save the file and then exit.


  1. but when i tried to save it says "it cant crate the c:WINDOWSsystem32driversetchosts file." , make sure path and file name are correct . What 'll b the error? can u help me?


Please enter your comment!
Please enter your name here