Evan Harmon - Memex

Hosts (file)

The computer file hosts is an operating system file that maps hostnames to IP addresses. It is a plain text file. Originally a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for the ARPANET membership, containing the hostnames and address of hosts as contributed for inclusion by member organizations. The Domain Name System, first described in 1983 and implemented in 1984, automated the publication process and provided instantaneous and dynamic hostname resolution in the rapidly growing network. In modern operating systems, the Hosts (file) remains an alternative name resolution mechanism, configurable often as part of facilities such as the Name Service Switch as either the primary method or as a fallback method.
wikipedia:: Hosts (file)
  • Basically a local computer’s dedicated file that can be checked first before reaching out to other computers/servers/DNSs to see if a domain name exists as a record anywhere.
  • Useful for using hostname to ip mappings on a local network or for redirecting a domain lookup to an internal resource instead of the external version
  • /etc/hosts
    • on Mac and Linux
  • Common Default hosts File
    • 127.0.0.1 localhost loopback ::1 localhost
    • Can have multiple domain names per ip
    • Can a hostname can be mapped both to an ipv4 and ipv6

Example

127.0.0.1  localhost loopback
::1        localhost
Hosts (file)
Interactive graph
On this page
Hosts (file)
Example