A text file that provides a local method for resolution of fully qualified domain names (FQDNs) into their respective IP addresses on a TCP/IP network. Hosts files are an alternative to DNS servers for name resolution on TCP/IP networks. They are used mainly on small networks or when maintaining a DNS server is impractical.
You can locate the hosts file using the following paths:
Each line in the hosts file contains the IP address of a TCP/IP host followed by the FQDN of the host, followed by an optional comment prefixed with a pound sign (#).
Hosts files should contain mappings for hosts on both local and remote networks. Mappings can consist of an IP address and one or more host names (aliases). If you are using hosts files to resolve host names on a network, each computer on the network should have a hosts file.
Place the host names that need to be most frequently resolved near the top of the hosts file, because the file is parsed linearly from the beginning.