hjV9H2bWu4ZhXPy
hjV9H2bWu4ZhXPy on Hacker News
Once again, mistakes made by an application-layer program (or spec!) do not invalidate the facts of underlying layers.
The hostname will always resolve to the same IP. A search domain doesn't change that, it changes what hostname is resolved.
(BTW: hostnames have existed since long before whatwg or even the web. I'm not sure why you would think whatwg have the authoritative definition of hostname.)
Also, since you like specs, here you go: "every domain name ends with the null label of the root", implying that the domain `foo` is, in fact, canonically, the domain `foo.` - RFC1035, November 1987. (The RFCs contemplate search domains as well, and mention that the final dot might be used as a cue to the application/library whether or not to apply the search domains, but that's entirely an application/library decision and changes the effective hostname/FQDN.)
In short: I never said that browsers and servers don't in fact treat them differently, I said that's a bug. You can't say "well they do it that way and the spec they wrote says it" as reasoning for it.
Except that it is, in fact, the same hostname. "It's that simple." This is defined by DNS. Go open Wireshark and run `dig google.com @8.8.8.8 +nocookie` versus `dig google.com. @8.8.8.8 +nocookie`. Observe that the queries are identical other than the "Transaction ID" (and perhaps some IP or UDP-level randomness).
Application-level software can get it wrong, but it is in fact the same hostname at a level that pretty much everyone uses.
Application-level software getting it wrong does not invalidate that fact.
You can not adopt an identifier from some other protocol, and then use it with a different meaning, without a bug.
(Tangentially, this is why naming shouldn't be handled at the application layer, since it's already handled at lower levels. It's quite sad that no one wants to start moving HTTP towards SRV records.)
> I was referring to search domains as the exception
Yes, I assumed so, but as I pointed out, this would lead to the common one (news.ycombinator.com) being broken while the other (news.ycombinator.com.) would work (or else be broken by an application-layer bug, i.e. processing of the Host header causing it to break)!
> ai and ai. might ... have one redirect to the other, might serve different content
Then they would be broken. They are the same hostname and the same origin. They can not do what they like because there's no way they could resolve to a different address.
(And, as above, to do so would actually lead to the site being inaccessible for some people with search domains, since `ai` might actually be used as a subdomain, and `ai.` would still work for them but for a faulty application-layer configuration)
Now, servers could certainly do the wrong thing when faced with a Host header ending in a `.`, but a) that's a bug in the web server (or browser, arguably - do they tack on a search domain to the Host header?) and b) is not a result of the wrong IP address etc. (It's also an HTTP-layer issue, not a DNS-layer issue, and doesn't apply to most other protocols.)
Note that it says "prior to" rather than "instead of". This is a reason not to use them from an operators POV, not a reason to block them.
> most users entering single-label names want them to be resolved in a local context
Most users have absolutely no idea how any of this works.
> These include causing traffic intended for local services to be directed onto the global Internet
I've never experienced any system that applies the search list after trying the label by itself.
> The IAB therefore feels compelled to state the following:
Each of their statements apply to people who would operate these domains, not to users blocking them.