Is localhost host resolved to [duplicate]

Posted on


Possible Duplicate:
Why is “ localhost” needed in HOSTS file ?

Is localhost host resolved to

If “yes”, then why does everything (IIS , ASP.NET, MS SQL Server, webapps, sharepoint, etc.) work on my WIndows XP Pro SP3 exactly the same if I use (or any loopback IP 127.0..0.*) instead of

Is localhost well-known Windows identifier?


The Loopback device (aka Locahost) is mapped to the whole range of to, which is why it works:

The most commonly used IP address on the loopback device is for IPv4, although any address in the range to is mapped to it.


See this article on host name resolution (specific to 2003, but should apply to XP).


  • Your DNS server is responding with localhost for any 127.* query (unlikely)
  • The entry is still cached (ipconfig /flushdns to clear it out)
  • You may have an lmhosts file that maps it

I have seen that the default networks file in windows contain loopback 127, which may be why this works.

It is also quite possible that the mapping loopback / localhost is built into the TCP/IP stack itself.

Leave a Reply

Your email address will not be published.