The Localhost IP is a unique identifier for a computer on the local network. It is used to identify a computer when it is connected to the network and to determine which port it is using.


Geeks the world over know their local host as 127.0.0.1, but why is that specific address, of all available addresses, reserved for the local host? Read on to delve into the history of local hosts.

Image by GMPhoenix; available as wallpaper here.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-drive grouping of Q&A web sites.

The Question

SuperUser reader Roee Adler, curious about the default localhost IP, posed the following question to the community:

What is the meaning, indeed? While it’s possible to live out your entire geeky existence not knowing the answer to those questions, we’re ready to dig in.

The Answers

Several contributors pitched in to answer Roee’s question, each one of their contributions helps shed more light on how 127.0.0.1 is the place we all call home. John T writes:

Hyperslug does some archive sleuthing by digging through old memorandums on the subject:

While we all know and love 127.0.0.1 as the localhost, it’s worth noting that it won’t be the localhost forever. 127.0.0.1 is how the localhost is designated in IPv4 communications and, as IPv6 slowly takes over, it will be designated by a much more intuitive number: 0:0:0:0:0:0:0:1.

The address zero is to be interpreted as meaning “this”, as in “this network”.

For example, the address 0.0.0.37 could be interpreted as meaning host 37 on this network.

The class A network number 127 is assigned the “loopback” function, that is, a datagram sent by a higher level protocol to a network 127 address should loop back inside the host. No datagram “sent” to a network 127 address should ever appear on any network anywhere.

Even as early as September 1981 RFC 790, 0 and 127 were already reserved:

0 and 127 were the only reserved Class A networks by 1981. 0 was used for pointing to a specific host, so that left 127 for loopback.

I know this doesn’t answer the question, but this is as far back as I could dig. It might have made more sense to choose 1.0.0.0 for loopback but that was already given to BBN Packet Radio Network.

Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion threads here.