How To Block A Particular Website In Windows


If you’re a internet user then there would be many situations where you got to block a website from your pc. It could be a Phishing website, a suspicious website or a website you don’t trust often. Most of windows users don’t know how to do it with windows built in features & they often search for programs. In this article i will show you 2 ways to block a particular website, domain or ip from windows by using build in functions.


  • First of all, go to your start menu & search for notepad, then right click & click “Run as Administraor” [See Image]
  • Once notepad is opened, click “File–>Open” & wait for directory window to open. [See Image]
  • Now, in place of folder name, type in “%windir%\system32\drivers\etc” & hit enter key from keyboard. [See Image]
  • Click on “Text Document(*.txt)” dropdown from bottom right & select “All Files(*.*)” [See Image]
  • Now, click on “Hosts” named file & hit “Open” button (or just double click on the file). [See Image]
  • at the end of the file, type in “” & hit tab key, then enter in the url of the website you want to block. [See Image]
  • Hit CTRL+S or File–>Save. & it will be saved.
  • That’s it, the website will now be blocked in your computer 🙂

Final Notes

This is the best & the safest method to block a website within windows. If you’re not able to save the hosts file then its probably because your file is write protected & set to read only, to fix that, go to the hosts directory, right click on the hosts file & go to properties. Now uncheck “Read only” (if checked) & hit Ok. You should be able to save the file now.

You may also like...

6 Responses

  1. Rohan says:


  2. Maria says:

    Thank you

  3. Ash says:

    thnx bro.. you can post about how to find build number of windows? looking forward for a reply

  4. Murphy Slaw says:

    In Windows 10, I just right-click the Windows icon (lower left on taskbar) and select run. Then type in “winver” without the quotes. A popup window appears showing the version of Windows. In other versions, run winver from the command prompt (start – run – cmd – winver). Hope this helps.

Leave a Reply

Your email address will not be published. Required fields are marked *