Basics of Hosts file; HOSTS file location and usage

• Host File is like first referenced address book which associates hostname with IP address.

• Example to associate to
o o Last line in below image will add the mapping

• Location of hosts file

• How to update:
Open Notepad (or any other text editor) in Admin privileges to edit HOSTS file


• Block a site: Avoid ads by pointing ad sites with your local IP address
• Test one server in a cluster: you may hit any server in the cluster by default. If you want to test one specific server, add host entry
• DNS issues: When DNS has issues, HOSTS file is a workaround
• Host Header: At times, you may be able to open a site with IP address but you have to use website (without DNS entry). HOSTS file is the only option

This entry was posted in knowledge, Productivity, Windows Server and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s