Internet is growing day by day, most of the business and people depend on 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 internet era we are very much forced to use 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 destructive path, nowadays even children are very much of capable of using internet and they are addicted to it.
Internet contains lot of pornographic sites which leads children’s 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 easy 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 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 a 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.
- Double click and open etc Folder.
- Find the hosts file in it.
- Right click on the host file and choose open with.
- Choose the Notepad to open the host file
- To Block any website using this host file simply add the following entry,
- 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 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.