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.
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:
|Host File Overview|
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 127.0.0.1 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.
4. That’s all now try to open www.facebook.com in your web browser it will not open.
The reason is quite simple by adding facebook.com in front of 127.0.0.1 , 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.
If you try to connect to Facebook using Facebook’s IP address that you can easily find by searching on Google 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.