Home

localhost

Localhost is the standard hostname that refers to the local computer. It is used to access network services running on the same machine and to facilitate inter-process communication. Traffic addressed to localhost is routed by the operating system to the loopback interface rather than to a physical network.

In IPv4, the loopback address is 127.0.0.1; in IPv6 it is ::1. The hostname localhost usually resolves

RFC 6761 designates localhost as a special-use domain name with loopback semantics. Some configurations may rely

Typical uses include testing web servers, databases, and other services without exposing them to the network.

Because traffic to localhost never leaves the host, it is generally safe for development and testing. However,

to
one
or
both
of
these
addresses
via
the
system
name
resolver.
On
most
systems
this
mapping
is
provided
by
a
hosts
file
(for
example,
/etc/hosts
on
Unix-like
systems
and
C:\Windows\System32\drivers\etc\hosts
on
Windows).
more
on
DNS,
but
the
localhost
entry
is
widely
present
and
expected.
A
service
bound
to
127.0.0.1
or
::1
is
reachable
only
from
the
local
machine;
binding
to
0.0.0.0
or
::
would
expose
it
to
other
hosts
as
well.
it
does
not
provide
access
to
remote
machines,
and
misconfigurations
can
cause
local
resolution
to
fail
in
certain
environments.