HTTP 511 Network Authentication Required
HTTP 511 Network Authentication Required means you must log in to the network itself before you can browse, which is what captive portals on hotel, airport…
Quick answer
HTTP 511 Network Authentication Required means you must log in to the network itself before you can browse, which is what captive portals on hotel, airport and café Wi-Fi do. It is sent by the network, not by the website you were trying to reach.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 511 Network Authentication Required mean?
The response usually includes a link or redirect to the portal’s login page. Apps that receive 511 should not treat it as an error from their own API.
| Status code | 511 |
|---|---|
| Name | Network Authentication Required |
| Class | 5xx Server Error |
| Defined in | RFC 6585 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | No: change the request first |
What causes HTTP 511?
- Connected to Wi-Fi with a captive portal that has not been accepted yet.
How do I fix HTTP 511?
- Open any http:// page in a browser to trigger the portal login, then accept the terms.
What should a client do after HTTP 511?
Complete the portal login, then retry.
Does HTTP 511 affect SEO?
No SEO impact.
Example 511 response
HTTP/1.1 511 Network Authentication Required
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json
{"error":{"status":511,"message":"Network Authentication Required"}} How to return 511 Network Authentication Required in code
Express (Node.js)
res.status(511).json({ error: 'Network Authentication Required' }); Next.js route handler
return Response.json({ error: 'Network Authentication Required' }, { status: 511 }); FastAPI (Python)
raise HTTPException(status_code=511, detail="Network Authentication Required") PHP
http_response_code(511); Nginx
location = /example {
return 511;
} Other 5xx status codes
The server failed to fulfil a valid request. Retrying later, with backoff, is usually reasonable.
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 503 Service Unavailable
- 504 Gateway Timeout
- 505 HTTP Version Not Supported
- 507 Insufficient Storage
- 508 Loop Detected
- 520 Web Server Returned an Unknown Error
- 521 Web Server Is Down
- 522 Connection Timed Out
- 523 Origin Is Unreachable
- 524 A Timeout Occurred
- 525 SSL Handshake Failed
- 526 Invalid SSL Certificate
Frequently asked questions
Why does my app get 511 on hotel Wi-Fi?
511 vs 407?
Is 511 a client or server error?
Related
- 407 Proxy Authentication Required HTTP 407 Proxy Authentication Required means a proxy server between the client and the destination needs crede.
- 401 Unauthorized HTTP 401 Unauthorized means the request lacks valid authentication credentials: no token, an expired token or .
- 403 Forbidden HTTP 403 Forbidden means the server understood the request but refuses to allow it.
- Open the HTTP Status Codes Reference → Free, no signup.