How captive portals work on guest Wi-Fi, and why they sometimes fail
In short: A captive portal blocks internet access until a user accepts terms or signs in. The network intercepts web traffic and redirects it to a login page. Phones and laptops detect this by requesting a known test address and noticing the redirect. Because most sites now use HTTPS, portals rely on that detection or on the newer captive portal API instead of redirecting real websites.
The basic idea
Hotels, airports, cafés and company guest networks often show a page asking you to accept terms, enter a room number or an email address, or log in with a code. Until you do, the network only lets a few things through (DHCP, DNS and the portal itself). This allowed list is called the walled garden.
How devices find the portal
Straight after joining a network, every operating system makes a quick HTTP request to a test address it knows: Apple uses captive.apple.com, Android uses connectivitycheck.gstatic.com, Windows uses www.msftconnecttest.com. If the answer is exactly what it expects, the internet works. If the request is redirected to something else, the device knows there is a portal and opens a small browser window showing the login page.
The HTTPS problem
Older portals worked by redirecting whatever website the user tried to open. Today almost every site uses HTTPS. The network cannot redirect an HTTPS request without presenting the wrong certificate, so the browser shows a security warning instead of the login page. That is why:
- portals rely on the operating system's plain HTTP test request;
- a newer standard (RFC 8908/8910) lets the network announce the portal URL directly through DHCP option 114 or IPv6 Router Advertisements, so devices can show the login page without any redirection tricks.
Why portals fail
- The device has a VPN or a custom DNS setting (such as DNS over HTTPS) that bypasses the portal's DNS.
- The login page itself loads resources from domains not in the walled garden.
- The portal's certificate is expired or self-signed.
- The session times out and the user is silently blocked again without the login page reappearing.
- Devices without a browser (games consoles, smart TVs, IoT) cannot complete the login at all; many networks let staff register those by MAC address.
Good practice for guest Wi-Fi
- Put guests on their own VLAN with internet-only access, firewalled from internal networks.
- Turn on client isolation so guests cannot reach each other's devices.
- Rate-limit per user so one person cannot use all the bandwidth.
- Consider Enhanced Open (OWE) so guest traffic is encrypted over the air even without a password.
- Keep the portal simple, and make sure it works on phones and with HTTPS-only browsers.
- Check local laws on logging guest usage and collecting personal data.
Real-world example: the hotel complaints
A hotel received constant complaints that guests' laptops "connected but had no internet". The portal's login page loaded fonts and scripts from a cloud service that was not in the walled garden, so the page never finished loading on many devices. Adding those domains to the walled garden, and announcing the portal through DHCP option 114, cut the complaints to almost none.
Practice
How does a phone know it has joined a network with a captive portal?
Why can portals no longer simply redirect any website the user opens?
Which DHCP option can announce a captive portal URL?
Key takeaways
- Captive portals block access until the user signs in or accepts terms.
- Devices detect portals by checking a known test address.
- HTTPS breaks old redirection; DHCP option 114 announces the portal directly.
- Isolate guests in their own VLAN with client isolation and rate limits.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.