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 first looks at the hosts file to resolve the name. If the name is not in the local hosts file, it tries resolving using a DNS (Domain Name Service), and if also not found, the look up fails.

Example of hosts file line

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

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

216.58.216.164 google.com

DNS, Lmhost, Local host, Network terms

  • Network and network card help and support.