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.
The HTTP **`511 Network Authentication Required`** [server error response](/docs/Web/HTTP/Reference/Status#server_error_responses) 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
```http
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:
```http
GET /document HTTP/1.1
Host: example.com
```
```http
HTTP/1.1 511 Network Authentication Required
Content-Type: text/html
<html lang="en-US">
<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
## See also
- [HTTP response status codes](/docs/Web/HTTP/Reference/Status)
- Proxy server
Cite this
"511 Network Authentication Required". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/511 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy