Hosts file

Updated: 11/16/2019 by Computer Hope
hosts file

A hosts file is a local file stored on the computer that translates domain names or NetBIOS names into an IP addresses.

When looking up an IP address, the computer will first look at the hosts file to resolve the name. If the name is not in the local hosts file, it will try resolving using a DNS (Domain Name Service), and if also not found the look up will fail.

Example of hosts file line

In the example below, the line translates 216.58.216.164 into the Google domain.

216.58.216.164 google.com
Tip

Microsoft Windows users should also see the lmhost definition for further information about configuring the Windows lmhost file.

DNS, Lmhost, Local host, Network terms