AES Encryption Explained: How It Works and Why It Matters
Jun 23, 2026
5xx Server Error
The 511 (Network Authentication Required) status code indicates that the client needs to authenticate to gain network access. This is typically used by captive portals — public Wi-Fi networks that require login or acceptance of terms before granting internet access. The response should include a link to the authentication portal.
When a user connects to a public Wi-Fi network and tries to browse the web, the captive portal intercepts the request and returns 511 Network Authentication Required. The browser should automatically open the login page specified in the response, where the user can authenticate or accept terms.
# Captive portal response
HTTP/1.1 511 Network Authentication Required
Content-Type: text/html
<html><body>
<h1>Wi-Fi Login Required</h1>
<a href="https://portal.example.com/login">Click here to login</a>
</body></html>
Mistake: Using 401 or 403 for captive portal authentication
Fix: Use 511 specifically for network-level authentication required by captive portals. 401 and 403 are for HTTP-level authentication and authorization, not network access control.
Mistake: Not providing a redirect URL or login page link in the 511 response
Fix: The 511 response should include a link or redirect to the authentication portal. Without it, users may not know how to authenticate to gain network access.
Blog
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026
Jun 23, 2026