511 Network Authentication Required
The HTTP 511 Network Authentication Required
server error response status code indicates that the client needs to authenticate to gain network access.
This status is not generated by origin servers, but by intercepting proxies that control access to a network.
Network operators sometimes require some authentication, acceptance of terms, or other user interaction before granting access (for example in an internet café or at an airport). They often identify clients who have not done so using their Media Access Control (MAC) addresses.
Status
511 Network Authentication Required
Examples
511 response for a GET request
In the following example, a client tries to access a resource on a network.
The request is not authenticated, and a proxy sends a 511
status code to prompt the visitor to log in.
The 511
ensures that non-browser clients will not interpret the response as being from the origin server.
Browsers are redirected automatically via the <meta>
tag after 10 seconds, or by clicking the link in the response body:
GET /document HTTP/1.1
Host: example.com
HTTP/1.1 511 Network Authentication Required
Content-Type: text/html
<html>
<head>
<title>Network Authentication Required</title>
<meta http-equiv="refresh" content="10; url=https://login.example.net/">
</head>
<body>
<p>You need to <a href="https://login.example.net/">authenticate with the local network</a> in order to gain access.</p>
</body>
</html>
Specifications
Specification |
---|
RFC 6585 # section-6 |