511 Network Authentication Required
5xx server error
You need to sign in to the network — a captive portal — before you can reach the internet.
511 (RFC 6585) is the code captive portals should use — the sign-in pages on hotel, airport and café Wi-Fi. Instead of hijacking your request with a fake 200 or a redirect, the network answers 511 with a link to its login page, so apps know they're not talking to the real server.
| Class | 5xx Server Error |
|---|---|
| Retry? | Not applicable |
| Cacheable by default | No — only with explicit Cache-Control |
| Response body | Allowed |
| Defined in | RFC 6585 §6 — 511 Network Authentication Required |
Example response
HTTP/1.1 511 Network Authentication Required
Content-Type: application/json
Content-Length: 43
{"error":"Network Authentication Required"}Common causes
- Joining public Wi-Fi that requires accepting terms or logging in.
How to fix it
- Open any
http://page in a browser to trigger the portal, sign in, then retry. - Apps must never cache a 511 response as if it came from the origin.
Check what a URL returns
Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.
curl -sI https://example.com/your-path | head -n 1
Frequently asked questions
Why don't all captive portals use 511?
Many predate it and still use redirects. Operating systems detect portals by probing known URLs (Apple's captive.apple.com, for example) rather than relying on 511.
Related status codes