A lot, probably most, wi-fi hotspots intervene in the connection with
their announcement, validation, or notification page (whatever they want
to call it). That has you agree to their conditions and may even
require you enter a login to allow traffic through their network to your
node (the page they show comes from their server).
In Firefox, it's called Captive Portal detection; see:
https://bgstack15.wordpress.com/2017/05/05/disabling-firefox-detect-captive-portal/
https://wiki.mozilla.org/QA/Captive_Portals
detectportal.captive was the setting to disable this "feature"; however,
I think Mozilla changed it to network.captive-portal-service.enabled. I
had the prior setting disabled and now that setting is no longer listed
and instead the latter named one is False (disabled). There was a bug
(#1354245, fixed) where Firefox was still polling its captive portal
detection site (to see if the poll was getting blocked) although the
captive portal service in Firefox had been disabled, and is why users
would set the captive portal URL (captivedetect.canonicalURL)) to
something else, like a blank value (empty string).
The captive portal detection was causing lots of problems (e.g.,
http://forums.mozillazine.org/viewtopic.php?f=9&t=3030018&p=14747993).
I ran into some problem with it (but don't remember it now), figured out
it was a new feature that caused the problem, and disabled captive
portal detection in Firefox.
Sorry, but Google Chrome has NEVER been as blessed (or cursed) as
Firefox regarding configurability. I'm not sure there is a config
option, like in chrome://flags, that will disable this feature which has
also caused problems with sites with captive portal redirection (e.g.,
https://productforums.google.com/forum/#!topic/chrome/qKqXmS477Ps).
https://docs.google.com/document/d/1k-gP2sswzYNvryu9NcgN7q5XrsMlUdlUdoW9WRaEmfM/edit
https://www.chromium.org/chromium-os/chromiumos-design-docs/network-portal-detection
It looks like Google did what Mozilla did in trying to connect to an
external site via HTTPS to see if block (meaning possibly behind a
captive portal). Unless I missed it, nothing there saying how to
disable that "feature". The --disable-chrome-captive-portal-detector
command-line switch can be used when loading chrome.exe; however, that
only works when using the command-line, like in a shortcut, to load
Chrome, not when Chrome is called as a child process, like when clicking
a hyperlink within an e-mail. Since China's Great Firewall blocks
access to Google's servers, I wonder what the Chinese do to get Chrome
to work despite its captive detection failing (and without rooting their
phone to alter the OS handling).
https://support.mozilla.org/en-US/kb/what-does-your-connection-is-not-secure-mean
From some reading, looks like captive portals are supposed to get their
own site certificates (since they are redirecting you to their internal
page but via HTTPS).
https://support.mozilla.org/en-US/questions/1150666
The suggestion there is to first connect to an HTTP site, get the
redirect to the captive portal's login/announcement page, and then
continue surfing using HTTP or HTTPS. Also don't use an HTTPS site as
your home page to which you web browser first goes when you load it.
I've never used a home page, it has always been about:blank. It is rare
that on every open of the web browser that I would always want to start
at the same site -- so rare that it has never happened. I click on a
hyperlink or I open the web browser and then enter the URL or use a
bookmark to decide where to go. The last time I had a non-blank home
page was back in AOL's heyday but even then I soon decided it was a
waste of my time to wait for a page to load that I didn't want since I
was always going somewhere else.
Are you using a VPN? After doing some research, I found all of them
slowed down my connection and very few were actually secure. Since the
VPN client expects to connect directly to the VPN server, perhaps
captive portaling gets in the way. Just because a hotspot is price-free
doesn't mean it is hassle-free. Does the problem happen at just a
couple of wi-fi hotspots that you often reuse or have you tried lots of
hotspots, like OTHER than the coffee shops and fast food joints?
Often a hotspot will use DNS spoofing: no matter where you try to
connect, they intercept the DNS request and send back the IP address for
their captive portal/login page. Web browsers don't like this. Often
the hotspot used 1.1.1.1 for their DNS redirection; however, now that's
a registered IP address:
https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/
So some users have begun seeing what looks like an ad but is Cloudflare
trying to cull users into using their DNS server (instead of Google's,
OpenDNS, etc).