HTTP 511 Network Authentication Required

The client needs to authenticate to gain network access (captive portal).

5xx Server Error

511

Network Authentication Required

Description

The 511 Network Authentication Required status code indicates that the client needs to authenticate to gain network access. The response representation should contain a link to a resource that allows the user to submit credentials. Note that the 511 response should not contain a challenge or the login interface itself, because browsers would show the login interface as being associated with the originally requested URL, which may cause confusion. The 511 status should not be generated by origin servers; it is intended for use by intercepting proxies that are used to control access to the network, commonly known as captive portals.

When Is It Used?

Encountered with captive portals in public WiFi networks (hotels, airports, cafes). When you connect to a WiFi network that requires login, the network proxy returns 511 to redirect you to a login page before granting internet access.

Example Response

HTTP/1.1 511 Network Authentication Required
Content-Type: text/html

<html>
<head><title>Network Login Required</title></head>
<body>
<h1>Network Authentication Required</h1>
<p>You must <a href="https://login.wifi.example.com">log in</a> to access the internet.</p>
</body>
</html>

Look Up Any Status Code

Browse all status codes