Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I ping localhost, I receive a reply from ::1 which IIRC is the IPV6 loopback address.

If I ping, I receive a reply from as expected.

Why is there a difference when hostname resolution of localhost is indeed

Please see the following screenshot:

Screenshot of command prompt ping localhost and ping

share|improve this question
up vote 4 down vote accepted

Hostnames can resolve to both IPv4 and IPv6 addresses. "localhost" resolves to IPv4 ( and IPv6 (::1).

I think Windows' preference is to use IPv6 where possible, which is why localhost defaults to the IPv6 resolution. If you turned off IPv6 it would go to the IPv4 address.

The reason you dont encounter this much when pinging internet servers is that many ISPs don't provide customers with IPv6 addresses (and many routers/modems can't handle them), and you need all devices in a chain to use IPv6 if you want to reach a server using IPv6.

share|improve this answer
Precisely - since Windows Vista, the Windows networking stack prefers IPv6. – Tobias Plutat May 19 '11 at 16:38
Technically there is nothing wrong with pinging either localhost or since they will normally (there are exceptions if the user points localhost to some other server but that's quite unusual) point to the same server (your local computer). – Hengjie Feb 10 '13 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.