Tuesday, January 31, 2017

How To Edit Your Hosts File in Windows

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. 

Note : We can modify in different method, here I am choosing below steps.

Step 1 -  Open a Notepad with Run as administrator.


Step 2 - Now we need to go hosts file location and edit the file. 

File Path => C:\windows\system32\drivers\etc\hosts
Step 3 -  Add the IP and Host-name, here I am adding my server address for accessing without DNS entry. We can also block websites using the same procedure.

Step 4 -  Check the connection using ping command with host-name.

Here, my host-name resolved, now I can access my server through IP or Host-name.

That's it...

1 comment:

  1. Thank you for sharing this helpful blog post on how to edit the hosts file in Windows. It's always great to learn new techniques for managing our computer systems. By the way, if you're looking for a reliable hosting solution to complement your technical endeavors, I highly recommend considering Sweden VPS Hosting .

    ReplyDelete