511 🌐 HTTP

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

  1. Open any http:// page in a browser to trigger the portal and log in
  2. Reconnect to the network or use mobile data
  3. In apps, detect HTML/511 responses and tell the user to sign in to the network

Detailed fix by platform

Browser

  1. bash
    # open a plain-http page to get redirected to the portal
    http://neverssl.com

How to diagnose

  1. Network — Does it happen on other networks?
  2. 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:

🧠 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.