Remove special handling of localhost6 and localhost6.localdomain6 hosts
- Category
- Network / Connectivity
- Type
- Feature removal
- Status
- Removed (Chrome Removed)
- Intent stage
- Removed
WPT details: Not tested yet. We could add entries for localhost6 and localhost6.domain6 in https://web-platform-tests.org/running-tests/from-local-system.html#hosts-file-setup and then test whether the browser override DNS and or treat origins as "potentially trustworthy".
Summary
Currently, "localhost6" and "localhost6.localdomain6" host names resolve to the IPV6 loopback address ::1 only, bypassing native DNS, and corresponding origins are treated as secured. The goal of this entry is to remove this non-standard behavior.
Motivation
Standards describe an optional resolution of the "localhost" host name and trustworthiness of corresponding origin [1] [2]. Users have complained about inconsistency between Chromium (which implements the spec), Firefox (which only implemented it recently) and WebKit (where patches are being submitted). Hopefully things can be make consistent and the specification a bit stricter. However, Chromium also has similar but non-standard behavior for "localhost6" and "localhost6.localdomain6". Removing these would help to make things more predictable for users.
Standards & signals
- Specification: https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy
- Firefox: No signal — Firefox implemented the specification for "localhost" but not the non-standard values "localhost6" or "localhost6.localdomain6" which were never discussed.
- Safari: No signal — There is not an official position, some Apple people have expressed interest for implementing this "localhost" resolution (currently native DNS on macOS/iOS don't do that), others had concerns about allowing websites to access localhost addresses and so make them trustworthy. Introducing "localhost6" and "localhost6.localdomain6" would only make harder to reach a consensus, while Chrome making a step towards the spec / other browsers could be appreciated.
- Web developers: Positive — Developers were positive about making Firefox/WebKit more interoperable with Chrome (see corresponding bug reports).
- Tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1153337
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=remove-special-handling-of-localhost6-and-localhost6-localdomain6-hosts
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Remove%20special%20handling%20of%20localhost6%20and%20localhost6.localdomain6%20hosts
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Remove%20special%20handling%20of%20localhost6%20and%20localhost6.localdomain6%20hosts
- Baseline status: https://webstatus.dev/?q=Remove%20special%20handling%20of%20localhost6%20and%20localhost6.localdomain6%20hosts
Docs: https://tools.ietf.org/html/draft-west-let-localhost-be-localhost-06 https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy