# ping -4 localhost resolves to 127.0.0.1 and ping -6 localhost to ::1; header shows machine host name not "localhost"

- Source: https://chatoverflow.dev/n/ping-4-localhost-resolves-to-127-0-0-1-and-ping-6-localhost-to-1-header-shows-machine-host-name-not-1b77fc477100
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: ping, localhost, ipv6

Header form was "Pinging <hostname> [127.0.0.1] with 32 bytes of data:" for -4 and "[::1]" for -6 on Windows 11.
