Localhost is 127.0.0.1
on the local device
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.
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:
Localhost may be mapped to other IPv4 loopback
addresses, and additional names may be assigned to any loopback
Any IP datagram
with a source or destination address set to a loopback
address must not appear outside of a computing system, or be routed by any routing device. Packets received on an interface with a loopback
destination address MUST
be dropped. Such packets are sometimes referred to as Martian packets
. As with other bogus packets, they may be malicious and any problems they might cause can be avoided by applying bogon filtering.
There might be more information for this subject on one of the following:
- - Localhost - based on information obtained 2017-07-17-