What it means
The client must authenticate to gain network access, typically on a captive portal (hotel or airport Wi-Fi).
Common causes
- Wi-Fi captive portal intercepting requests
- Network login session expired
How to fix it
As a client or visitor
Open any page in a browser and complete the Wi-Fi login or terms page.
As the site or API owner
Captive portals should send 511 instead of redirecting with 302, so apps do not mistake the portal page for real content.
Example response
HTTP/1.1
HTTP/1.1 511 Network Authentication Required
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Content-Type: text/html
<html><head><meta http-equiv="refresh" content="0; url=https://login.wifi.example/"></head></html> Specification
FAQ
› Who sends 511?
The network's captive portal, not the website you were trying to reach.
› Why does my app get HTML instead of JSON on hotel Wi-Fi?
The captive portal intercepted the request; check for 511 or unexpected redirects.