Block any Website using Host file?

Internet is growing day by day, most of the business and people depend on the internet today, International Telecommunications Union estimated about 55.1% of world’s population has internet access as of June 2018 and also its growing day by day. This is the internet era we are very much forced to use the internet nowadays the internet has two sides, one side it is very much useful for us without that we can even work or live a normal life and another side this internet making us lazy and leading people to the destructive path, nowadays even children are very much of capable of using the internet and they are addicted to it. The Internet contains a lot of pornographic sites that lead children to their destructive path easily, today in this guide we will see how to Block any website without any software. Before proceeding let’s discuss about host file, what is host file and how it associates in blocking sites.

Host file in windows is used to map Hostnames (google.com) to IP address. Each site has a separate IP address that IP address are mapped to hostname like google.com, technoresult.com for easily memorize purpose. The conversion of IP address to Hostname and Hostname to IP address are taking care of DNS also known as Domain Name System. There are lot of process involves in DNS short and quick we will complete this as soon as possible. Domain Name System are mainly used to resolve Hostname to IP address, check here to know more about DNS. While browsing any website browsers first check local system host file for IP address resolutions if that Host file is empty then it will move to local DNS server for resolution purpose. Normally Host file is an operation System file which is available in all kind OS. In windows this Host file is located in %SystemRoot%\System32\drivers\etc\hosts.

How to Block any Website using this Host file?

  • Open Command Prompt and type Drivers and hit enter.

Opening Drivers folder-Block any Website using Host file

  • Double click and open etc Folder.

Opening the Host file-Block any Website using Host file

  • Find the hosts file in it.

Host file format-Block any Website using Host file

  • Right-click on the host file and choose open with.

select open with-Block any Website using Host file

  • Choose the Notepad to open the host file

right click and choose notepad-Block any Website using Host file

  • To Block any website using this host file simply add the following entry,

127.0.0.1        example.com

  • What this does is simple – 127.0.0.1 is the IP address’ of your local computer. When you navigate to example.com, your computer will try to connect to itself (127.0.0.1). Your computer probably won’t find a web server running on itself, so the connection will fail immediately, effectively blocking the website from loading.
  • To make any changes you must log in as an administrator. Sometimes even when you logged on with administrative credentials you may receive the following error message:

Access to C:\Windows\System32\drivers\etc\ hosts was denied If you receive the above error message copy the host File to the desktop and right-click to edit. Once you done your editing save it and copy the file back to the same location. 

Leave a Comment

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

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

Scroll to Top