Sunday, 1 February 2015

How to Block Website on Windows Computer

You might want to block certain website that irritates you and turn down your browsing experience. Read this tweak to block any website for free in an easy way.

You might want to block certain website that irritates you and turn down your browsing experience. There are many website which shows advertisements of explicit content or showing up unnecessary things. Some might be spreading viruses and malware to infect your PC or even be trying to track you online and steal your personal information.

How to Block Website on Windows Computer

There are many ways to block these website and prevent companies from tracking you. Well there are many paid alternative to do this but let's learn the free and easy method.
In this post, I will explain you few simple steps to use host file as an option to block website. Host file in Windows controls how you connect to the Internet. Every Website is hosted on the server which have fixed/static IP address and DNS provide an IP address a unique name (for example - We can use host file in Windows to redirect website to the IP address which doesn't exist (for example - localhost (

Block Website in Windows

Make sure you're signed in to Windows with one of the administrator account. You'll not be able to edit the hosts without admin rights.

How to Block Website on Windows Computer
  • Open Notepad as Administrator.
  • To open Notepad as Admin, follow the three steps given below:
  1. Press Windows Key.
  2. Type Notepad in the search field. In Windows 8 or above move your mouse cursor to any corner of the Window and click on Search to start searching.
  3. Right click on the Notepad and select Run as Administrator from the right click menu.
  • After opening the Notepad with required permission, click File > open.
  • Navigate to the following folder.

Note: If you have installed your OS on another drive than replace C with that drive letter.
  • Select All Files from the file type box (at the bottom of the dialog box) else the host file will not appear in the list.
How to Block Website on Windows Computer
  • Select hosts and click open button.
  • Add a new line to the host file at the end. Type > Click space bar to give space > Type website name you want to block. If you want to block than you'll add the following line to host file.

How to Block Website on Windows Computer
  • To block another website, add a new line > type > give space > type url address you want to block.
  • Click File > Save. You can also press CTRL + S key to save the file.
Note: Your antivirus might warn you about these changes as host controls the way you connect to different websites on Internet. Ignore warning.
  • Done. Your site is blocked now and you'll not need to restart your system or your browser.
If you use Windows Defender or Firewall than it might revert the changes you made to the host file and you'll not be able to block the website. If you followed the above steps and site isn't blocked than you can exclude hosts files from being monitored from Defender. Follow these steps.

Read: You might want to know some tricks to access blocked website.

Note: Excluding hosts files from being monitored can cause you more trouble and make your Computer prey to malicious attacks.
  1. Open Windows Defender.
  2. Go to Settings tab and click on Exclude file and locations.
  3. Navigate to the file - C:\Windows\System32\Drivers\etc\hosts.
  4. Click Add button and than save your changes by clicking save changes button.
Now after excluding the hosts from being monitored follow the above mentioned steps to edits host files again. Site will be blocked just after saving your changes.

1 comment:

  1. I am using AVG protection for a few years now, I recommend this solution to all you.