Timeline for Why does *.localhost resolve to 127.0.0.1 and ::1?
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 28, 2018 at 20:58 | vote | accept | l0b0 | ||
| May 28, 2018 at 20:48 | answer | added | jdwolf | timeline score: 3 | |
| May 28, 2018 at 19:54 | comment | added | phemmer | Also just FYI, before /etc/resolv.conf and /etc/hosts there is /etc/nsswitch.conf which controls what sources the libc resolver uses, and in what order. grep '^hosts:' /etc/nsswitch.conf. | |
| May 28, 2018 at 15:47 | comment | added | Johan Myréen | @Isaac I think you can write that as an answer. From the page you linked to: "systemd-resolved synthesizes DNS resource records (RRs) for the following cases: [...] any hostname ending in ".localhost" or ".localhost.localdomain") are resolved to the IP addresses 127.0.0.1 and ::1" | |
| May 28, 2018 at 9:04 | comment | added | user232326 | Are you using systemd? It has a last resort resolver that (if none other nameserver resolved it before) resolves localhost to ::1. | |
| May 28, 2018 at 3:39 | history | edited | l0b0 | CC BY-SA 4.0 | added 249 characters in body |
| May 28, 2018 at 1:42 | history | edited | l0b0 | CC BY-SA 4.0 | deleted 6 characters in body |
| May 28, 2018 at 0:16 | comment | added | Ignacio Vazquez-Abrams | What does getent say? | |
| May 27, 2018 at 23:34 | history | asked | l0b0 | CC BY-SA 4.0 |