How To 

How To Edit Hosts File in Windows



Host files are the files used by Microsoft TCP/IP for windows. It shows the mapping of the IP address with its corresponding Host name. It helps to access any web site or web page easily. Mapping the IP addresses with their Host names also help to resolve DNS issues.

DNS is responsible to map or access a web site. It translates the host name or the web site name to its corresponding IP address, thereby providing access to the respective web site or web page. If there is any problem in the DNS, the communication to any web page becomes difficult.

The host files map the IP address to its Host names thereby making the DNS lookup easy. If you specify any IP address and its corresponding host name, the work of DNS becomes simpler, thereby making the lookup faster, and the web site can be accessed more easily. Host files can also be used to block any web site on your system. Here, the web site name is specified and a default IP address is set to it. Now, whenever a user tries to access this website it is not located by the DNS.

Host files are generally READ ONLY, in other words you cannot modify them in general. To edit a host file, you need to remove it from READ ONLY constraint and then move it anywhere else to edit it. It can be edited using NOTEPAD.

[video="https://www.youtube.com/watch?v=Cf1Yl_bNMy0"][/video]

Path to Host File
C - > Windows - > System32 - > drivers - > etc - > hosts

To edit the host file:

    ■Log on to Windows with administrator account.
    ■Browse to the above location.
    ■Right-click the host file and from the drop down menu click on Properties.
    81w0IKj.jpg

    ■Uncheck the READ ONLY checkbox. You will be needed to provide administrator permission to perform this task.
    2YIWAy3.jpg

    ■Now copy this file to some other location on your computer.
    OqWuKpJ.jpg

    ■Open the copied file in Notepad.
    ■In the opened file, go to the bottom and add a new line specifying the IP address of the trusted website followed by its corresponding URL.
    YqfMpWd.jpg

    ■Finally save the file.
    ■Paste the file back at its original location.
    ■Restart the computer to allow the changes to take effect.

Note: Using the above tweak, you can also block any site on your system. All you need to do to block a website is to type IP address 127.0.0.1 followed by the URL of the unwanted website, and restart the computer to allow the changes to take effect.
 
Status
Not open for further replies.
Status
Not open for further replies.