Solution:
Root Cause: DNS Hijack Interception Failure due to Custom Resolvers
Public Wi-Fi captive portals rely on DNS interception (DNS hijacking) to redirect initial web browser requests to their authentication landing page. When a client device connects, the gateway's internal DNS server responds to all domain queries (e.g.,
example.com) with the IP address of the local captive portal web server.
If your device or browser is configured to use static DNS servers (such as Cloudflare
1.1.1.1 or Google
8.8.8.8), or utilizes Encrypted DNS / DNS-over-HTTPS (DoH), queries bypass the local gateway's DNS interceptor entirely. The public DNS server attempts to resolve the real IP address, but because the gateway blocks unauthenticated WAN traffic, the connection times out and the login page never loads.
Diagnostic Verification:
Open Command Prompt or Terminal and execute a lookup to test DNS routing: nslookup neverssl.com
If the request times out or targets an external IP address directly without returning the local gateway address (typically 192.168.x.1, 10.x.x.1, or 172.16.x.1), DNS interception is being blocked by custom resolver configurations.Step-by-Step Fix:
1Revert OS IPv4/IPv6 DNS to Automatic (DHCP):
Windows: Open Run (Win + R), type ncpa.cpl. Right-click your Wi-Fi adapter > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties. Select Obtain DNS server address automatically.macOS: System Settings > Network > Wi-Fi > Details > DNS. Remove any custom IPv4/IPv6 entries so the list populates dynamically from the gateway.Android/iOS: Open Wi-Fi settings > Select connected network > Modify/IP Settings > Set DNS to DHCP or disable Private DNS.2Disable DNS-over-HTTPS (DoH) in Web Browsers:
Chrome / Edge: Settings > Privacy and security > Security > Disable Use secure DNS (or set to *With your current service provider*).Firefox: Settings > Privacy & Security > DNS over HTTPS > Select Off (Default Protection).3Flush Local DNS Resolver Cache:
Windows: ipconfig /flushdnsmacOS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder4Trigger Portal via Plain-Text HTTP:
Open a browser and navigate to a non-HTTPS plain-text site: http://neverssl.com or http://httpforever.com.Prevention & Long-Term Monitoring:
Re-enable Secure DNS / Custom DNS settings only *after* completing captive portal authentication. Consider using browser profiles or network-location aware DNS tools that automatically toggle DoH off on untrusted public networks.