by simoncion · 1mo ago · 0 comments
The web page at example.com is maintained as a courtesy by IANA in order to explain the purpose of the example.com domain to wayward humans.
In the nomenclature of RFC 2119, one MUST NOT design computer systems that rely on the correct operation of an HTTP server at that domain. [0] Plus, it's _really_ rude to pound on a small-scale service being provided as a courtesy... go hit the home page of a tech megacorp (such as Microsoft or Google) or the status page for a major CDN (such as Cloudflare or Akamai) instead!
[0] I expect that someone here will want to pop up with a "gotcha" where they say something like "Oh, but IANA's email says that automated use is strongly recommended against, rather than prohibited and besides, they can't actually stop me from doing it!". To that, I reply "Sure, and standards-writers can't actually stop implementers that do the profoundly antisocial thing and do the things they MUST NOT. As any adult who's been paying attention to the world around them throughout their lives knows, there's only so much you can do to stop people who are very determined to be enormous assholes.".
Would you settle for any old static page served by Cloudflare? For instance, example.com? https://bgp.tools/dns/example.com
Maybe Cloudflare gives them a good rate, or is donating service, but it's also possible or even likely that IANA is just using Cloudflare as a vendor, and therefore is paying for all the traffic, which is why they don't want people relying on it or hammering it all the time
In the nomenclature of RFC 2119, one MUST NOT design computer systems that rely on the correct operation of an HTTP server at [example.com.] Plus, it's *_really_* rude to pound on a small-scale service being provided as a courtesy.Much too big for metered data, full of ads, and importantly they all mandate HTTPS these days, which breaks my use case of forcing a captive portal on paid/login-gated Wi-Fi to render.
example.com is (unfortunately for the IATA) the almost perfect "can I reach the Internet" service: It's unlikely to go away, supports HTTP, is fairly small, easy to remember, and I don't care if a captive portal poisons my DNS cache with a fake response temporarily.
You'll be pleased to learn that nearly (actually?) all major sites that mandate HTTPS provide an HTTP redirect response when hit on port 80. You can't help but agree that a 30X with no body is way less data than pulling down even just the HTML parts of example.com.
curl -v http://cloudflarestatus.com
* Trying [2600:1901:0:4a3b::]:80...
* Host cloudflarestatus.com:80 was resolved.
* IPv6: 2600:1901:0:4a3b::
* IPv4: 35.201.124.30
* Established connection to cloudflarestatus.com (2600:1901:0:4a3b:: port 80) from [REDACTED] port [REDACTED]
* using HTTP/1.x
> GET / HTTP/1.1
> Host: cloudflarestatus.com
> User-Agent: curl/8.22.0
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 301 Moved Permanently
< Cache-Control: private
< Location: https://www.cloudflarestatus.com:443/
< Content-Length: 0
< Date: Wed, 07 Oct 2026 08:07:34 GMT
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host cloudflarestatus.com:80 left intact
And in regards to "DNS cache poisoning", approximately no one cares about hitting the status page of a major CDN. ;)> ...which breaks my use case of forcing a captive portal on paid/login-gated Wi-Fi to render.
Huh? Captive portals -especially ones that redirect to payment collection systems- are served up by infrastructure that either you control or that you've arranged with someone else to operate. If you're paying IANA to operate your captive portal, and they've made the choice to hit example.com:443, then that's their -odd- choice... but I bet that's not who's operating your captive portal.
If you've designed a captive portal system that depends on a functioning HTTPS server at example.com, you desperately need to go back and redesign it... if for no other reason than to -given your concern about metered data- massively reduce your own bandwidth bills.
My browser (in which I do these ad hoc connectivity tests) does in the end pull down the redirection target including all resources. Not fun on a slow and metered network such as in-flight Wi-Fi.
On top of that, sites like google.com just haven't worked as well for me in the past in these situations. Not sure why, but I suspect they just use all the latest security extensions like HSTS etc., making it hard to access the non-secure version once that's cached. Could also be some heuristics in my browser.
> And in regards to "DNS cache poisoning", approximately no one cares about hitting the status page of a major CDN. ;)
What I mean is the captive portal poisoning my DNS cache, and thereby rendering e.g. google.com unusable for me even after authenticating/purchasing access. I don't really care if example.com redirects me to the in-flight Wi-Fi portal; in fact, that's usually what I want it to do when losing connectivity.
> Huh? Captive portals -especially ones that redirect to payment collection systems- are served up by infrastructure that either you control or that you've arranged with someone else to operate.
I (unfortunately?) don't control the payment systems or captive portal implementation of the airlines I fly with. I'm just sharing my experience in practically mitigating their various deficiencies as a user.
Second, why are you doing this check manually? Every major consumer OS and web browser does this for you:
Firefox does it automatically regardless of OS [0] by hitting 'firefox-portal-detection.com'. Windows does this [1] by hitting one of a few domains, depending on OS vintage. OSX and iOS are said to do this by hitting 'captive.apple.com', and Chrome by hitting one of a few domains, but I can't find corroborating official docs. Moreover, this report [2] published by the WBA ~six years ago [3] confirms that every major OS except for Linux -as well as some minor ones- does this automatically for you... and both Firefox and Chrome do it regardless of OS, so the lack of OS-level detection on Linux doesn't matter. I'd be shocked if things have gotten worse in the past six years, especially with the publication of relevant RFCs back at the turn of the decade.
Don't be a gaping asshole. If you must manually hammer on something, hammer on <http://cloudflarestatus.com> or similar. Don't hammer on example.com.
[0] <https://support.mozilla.org/en-US/kb/captive-portal>
[1] <https://learn.microsoft.com/en-us/troubleshoot/windows-clien...>
[2] <https://captivebehavior.wballiance.com/>
[3] <https://github.com/wireless-broadband-alliance/captive-behav...>