Home / How to Hack / How to block websites without any software

How to block websites without any software

Today lets learn how to block websites without using any software. We can easily block websites using the software’s but that require a little bit of effort like downloading and purchasing some software to block website and there configure it. We can also block websites just by editing the hosts file in the windows system32 folder.

What is Hosts file?

Host File is a file in Windows System 32 which contains the mapping of IP addresses to the host names. The host file helps in addressing network nodes in a computer network and serves the function of translating human-friendly host names into numeric protocol addresses, called IP addresses. 

Content of Host File:

The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. Each entry is added to new line and separated by a space. The sample of that is shown below:

How to block websites without any software
Host File Overview
Steps to block any website using Host file:

1. Open the hosts file with notepad. Its located at C:WindowsSystem32Driversetc
Note: This is location in windows XP, vista and Windows 7.
2. Now go to the end of host file and press enter for new line.
3. In the new line type and then leave one space and then type the website name that you want to block.
Suppose i want to block Facebook.com. For blocking Facebook i will type below text into hosts file and save it.  www.facebook.com

4. That’s all now try to open www.facebook.com in your web browser it will not open.

Why it will not open?

The reason is quite simple by adding facebook.com in front of , you have restricted the host name not to translate host name into IP address. For system to connect to any website, it must that first its host name is converted to numerical value called IP address. So we have restricted our network to translate the IP address of the facebook. 

Drawback of this technique:

If you try to connect to Facebook using Facebook’s IP address that you can easily find by searching on that means in place of www.facebook.com you will type its IP address in address bar then website will open.

I hope you all like it…. If you have any queries ask me in form of comments.

About Lokesh Singh

Hello Friends, i am Lokesh Singh, certified Ethical hacker ( CEH, SSA, CSIF , CISSP). Have 8+ years of extensive experience in Ethical Hacking, Cyber Security and Penetration Testing domain.

Leave a Comment