HTTP 511 Network Authentication Required
A captive portal (hotel, airport, office Wi-Fi) is intercepting your traffic until you log in or accept its terms.
Seen on:
REST API
Meaning
Public and corporate networks redirect or block traffic until the user authenticates on a portal page. 511 is the standard way for the network (not the website) to say so. Apps and API clients see it as a strange HTML response instead of JSON.
Common causes
- Not yet logged in to hotel/airport/café Wi-Fi
- Captive portal session expired
- Corporate network requiring proxy/NAC authentication
⚡ Quick fix
- Open any http:// page in a browser to trigger the portal and log in
- Reconnect to the network or use mobile data
- In apps, detect HTML/511 responses and tell the user to sign in to the network
Detailed fix by platform
Browser
- bash
# open a plain-http page to get redirected to the portal http://neverssl.com
How to diagnose
- Network — Does it happen on other networks?
- Body — Is it an HTML login page instead of your API’s JSON?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026