Captive portal WiFi Hotspot error fixes

Public WiFi typically has captive portal login, a weak, trivially spoofed authentication method that is fundamentally incorrect but usually works. Portals force users to accept obnoxious terms and conditions and absolution of liability before accessing the Internet. To varying degrees, the portals may be worked around by savvy users. Most users just tolerate the portals.

Here’s how to understand and workaround some of the most common connectivity issues due to defective captive portals. Telling companies their WiFi is broken and how to fix it gets sort of a quizzical response. Nonetheless, I still offer them free technical info in case it gets forwarded to their IT provider, which is unlikely to be in-house, or their network would actually work.

The following sections detail how to trigger captive portals in case they didn’t come up for you, perhaps in locales that block your expected captive portal trigger URI. If one doesn’t work for you, try another–they all should work regardless of OS. Due to the rise of HSTS, just browsing your favorite website will not work, because it most likely has HTTPS and HSTS, which block HTTP captive portal redirects–this is one of the main purposes of HSTS.

For those configuring network firewalls, the URIs below can change at any time.

Modern web browsers themselves try to trigger captive portals by checking servers, in case the OS hasn’t already triggered the captive portal.

  • Firefox: detectportal.firefox.com/success.txt
  • Chromium: clients3.google.com/generate_204

Check connectivity manually using curl like:

curl -w %{http_code} connectivity-check.ubuntu.com

This should return on stdout 204.


macOS checks for response code 200 from captive.apple.com/hotspot-detect.html Windows checks network connectivity by accessing msftconnecttest.com/connecttest.txt The many variants of Linux including Fedora and Ubuntu check connectivity by looking for expected HTTP response codes such as 200 or 204.

Linux distro site HTTPS response code
Ubuntu connectivity-check.ubuntu.com 204
Fedora fedoraproject.org/static/hotspot.txt 200

If you desire to disable connectivity checking in Ubuntu, this is done via: Settings → Privacy →“Network Connectivity Checking”

Android checks Internet connectivity on new and existing connections by looking for response code 204 from connectivitycheck.gstatic.com/generate_204 Networks that block Google may show a heads-up message saying

Connected, no Internet

If there’s not a captive sign-in webpage, the network connection may actually be working to non-Google sites.