LightAtom

127.0.0.1: The Loopback Address

127.0.0.1 is the IPv4 loopback address: it always means this computer.

Traffic sent to it never leaves the machine, which is how local servers and apps talk to each other.

The whole 127.0.0.0/8 range is loopback, so 127.0.0.2 works too, but 127.0.0.1 is the convention. A server bound to 127.0.0.1 is invisible to other devices, which makes it the safe default for databases and dev tools; binding to 0.0.0.0 instead exposes it to your network.

Facts

Address
127.0.0.1
Owner
Reserved loopback range 127.0.0.0/8

On a Mac

On a Mac, localhost resolves to both ::1 (IPv6) and 127.0.0.1. A development server listening only on one of them won't answer on the other; check with lsof -nP -iTCP -sTCP:LISTEN. The loopback interface is lo0 (ifconfig lo0).

Frequently asked questions

What is 127.0.0.1?

The loopback address: it refers to your own computer. Connections to it stay inside the machine.

Is 127.0.0.1 the same as localhost?

Usually. localhost is a name that resolves to 127.0.0.1 and, on a Mac, also to ::1. A server listening on only one can fail for the other.

Can others reach my 127.0.0.1?

No. Loopback traffic never leaves your computer. To share a server, it must listen on a network address such as 0.0.0.0.

LightAtom team

The people who build LightAtom, a network monitor for macOS.