The client needs to authenticate to gain network access, typically through a captive portal or WiFi login page.
The 511 Network Authentication Required status code indicates that the client needs to authenticate to gain network access. This is not an error from the target web server but from the network itself -- typically a captive portal that intercepts HTTP requests before the user has logged in to the WiFi network or accepted terms of service.
A 511 response is generated by network infrastructure (not the destination server) when a user connects to a network that requires authentication before granting internet access. This is the standard behavior of captive portals found in hotels, airports, coffee shops, hospitals, and corporate guest networks.
When you connect to such a network and try to access any website, the network gateway intercepts your request and returns a 511 response with a login page. Once you complete the authentication (accepting terms, entering a password, or providing payment), the gateway allows your traffic through to the actual internet. Defined in RFC 6585, the 511 was created to distinguish captive portal interception from actual server errors.
http://neverssl.com or http://captive.apple.com. HTTPS sites may not trigger the captive portal redirect correctly. The login page should appear automatically.ipconfig /flushdns in Command Prompt. [macOS] Run sudo dscacheutil -flushcache in Terminal. [Linux] Run sudo systemd-resolve --flush-caches.GET / HTTP/1.1 Host: example.com
HTTP/1.1 511 Network Authentication Required Content-Type: text/html <html> <head><title>Network Login Required</title></head> <body> <h1>Welcome to Airport WiFi</h1> <p>Please <a href="https://portal.airport.com/login">log in</a> to access the internet.</p> </body> </html>
Monitor your endpoints 24/7 and catch connectivity issues before they impact your users.
Start Free Monitoring