Localhost is a hostname that means this computer.
Localhost is used to access the network services that are running on the host via its loopback network interface. Using the loopback interface bypasses any local Area Network interface hardware.
The local loopback mechanism is useful for testing software during development, independently of any networking configurations.
For example, if a computer has been configured to provide a website, directing a locally running web browser to http://localhost may display Localhost home page.
On most computer systems, Localhost resolves to the IP address 127.0.0.1, which is the most commonly used IPv4 loopback address, and to the IPv6 loopback address ::1.[1]
Localhost is also a reserved Top-Level Domain name, set aside to avoid confusion with the definition as a hostname. The IETF standards restrict domain name registrars from assigning the name Localhost in registration procedures. (RFC 6761)
The resolution of the name Localhost into one or more IP Address is configured by the following lines in the Operating System's hosts file:
127.0.0.1 localhost ::1 localhost