How To Block Websites on Windows 10 with Host File

The world of internet is a pool of numerous websites which has turned everything digital. But not all those website might be appropriate for everyone.Suppose that you want to stop your friends or children from opening a particular website on your computer. Just telling them to stop opening them wouldn’t be a great solution. If you feel that you need to block certain sites manually be changing certain settings on your system, here you go. This article is going to navigate you perfectly through the steps you need to follow in order to accomplish it.



But before we proceed,let me introduce you to a new term Windows Host File. The hostnames connected to a network needs to be mapped to their corresponding IP addresses. This is done so to uniquely identify a particular system in a pool of systems connected to the Internet. This Windows Host file is responsible for providing this mapping function. Slight modifications made to this file can help you block the particular website. Well, now let us start discussing the process.

Also read:How to restrict PC usage time for an account on Windows 10

STEPS TO BLOCK WEBSITES BY MODIFYING WINDOWS HOST FILE

STEP 1

First of all, search for the Notepad by typing for it in the Search bar provided in the bottom left of your desktop. Right click on it and choose the option Run as Administrator.

open notepad

STEP 2

Now, once it opens up, you will have to open up a file in the location shown below. This can be done by choosing the option Open from Files in the menu at the top.

C:\Windows\System32\drivers\etc

hosts-1

STEP 3

Now, copy right click and cop[y the file and paste it on your desktop. Now, open the file with a notepad editor and add two lines at the bottom of the file.

127.0.0.1      www.websitename.com

127.0.0.1      websitename.com

hosts-filepng

STEP 4

Now, save the changes to the file. Now, copy and paste it back again in the etc folder. The original file will get replaced.

replace

 

STEP 5

 

facebook

How to redirect Blocked website to another website

Now suppose that you need to make any other website open up when your friends secretly try to open up the site you had opposed. Lets see how it can be done.

  • Open up the command prompt and type ping sitename.com. The sitename is the name of the site to which you want the website to be redirected on. Say for example you need to redirect to google.com, you can type ping google.com. This will give you the IP address of the site.

cmd command

 

As shown above,I have obtained the address for google.com.

  • Now, as described above, instead of adding 127.0.0.1 to the bottom of notepad, you can add

IPaddress websitename.com

IPaddress is the address you have currently received from command prompt and website name is the name of the site you want to redirect to another site.

redirecting site

 



In my case, I am redirecting the site hello.com to the Google’s site which has the IP address 216.58.220.40. From now on the Google’s site opens up when you search for hello.com.

One Response

  1. mathew January 24, 2017

Leave a Reply

Your email address will not be published.

css.php