How to Block Websites in Windows 7/8/8.1

0
Searching for how to block websites ?  Well everyone wants to block unwanted websites to keep there network clean even parents want to block websites to keep their childrens away from dirty stuffs. In previous tutorial I already covered how to open blocked sites & today I’ll be covering how to block websites on you pc. So to make this task easier I came up with a very simple method that will guide you in blocking websites on your pc. 

 

How to Block Websites in windows 7/8/8.1

 
So in this method we are going to edit windows hosts file in order to block websites. Hosts file is like a local DNS server in windows operating system. It is used by an operating system to map hostnames to IP addresses. So before st here a step by step guide on how to block websites on your computer.
  • Go to start and search for notepad.
  • Right click notepad and click on run as administrator.
  • Now go to file – open, At file name enter the file location given below and click open.

C:WindowsSystem32driversetchosts

  • Now it will open hosts file and it looks something like this :

How to Block Websites Using Hosts file

  • So here’s the tricky part, scroll at the bottom of hosts file and add 127.0.0.1 followed by the website URL that you want to block.

For Ex – Suppose I want to block geeksgyaan.com so I’ll add the following line :

127.0.0.1            www.geeksgyaan.com
 
Tip – Enter the URL of the website including www otherwise it won’t work.
  • Now similarly on new line we can again add a website and in this way we can block n numbewr of websites as shown below.

How to Block Websites Using Hosts file

  • Save your hosts file and now whenever you try to access those sites it will show Webpage not available.

Watch video on how to block websites in windows 7/8/8.1


How this blocking method works ?

First of all let me explain you what is DNS server. DNS server is used to translates website domain name into their respective IP address so that means DNS server contain a list of domain names with their IP addresses. As I have written earlier hosts files act as a local DNS server within windows. So in the above method we have assigned a NULL Ip address to the website that we want to block. As the Ip address is NULL (Not working) hence we are no longer able to access that website. Using hosts file we can also redirect one website to another that means we can redirect facebook.com to youtube.com. We just need to replace 127.0.0.1 with the Ip address of the website that we want to redirect.

Hope you are able to block unwanted websites, If you have any doubts then feel free to ask in comments. 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.