Sitelet https://funapi.dev/status/511

HTTP 511 Network Authentication Required

The client has to authenticate to gain network access — the response comes from a captive portal, not from the server you asked for.

Defined in RFC 6585 §6 — 511 Network Authentication Required · MDN reference

Where you meet HTTP 511 in production

Hotel, airport, café and guest Wi-Fi portals that intercept every request a device makes until the user accepts the terms or logs in.

Why you would test it

Mostly a test of resilience: an app on hotel or airport Wi-Fi receives HTML from a portal instead of JSON. Check it says "sign in to the network" instead of crashing on a parse error.

What your client should do about a 511

Do not parse the body as your API's response — it is not. Prompt the user to open a browser and sign in to the network, then retry.

511 versus the codes it gets confused with

Endpoints that return 511

1 endpoint in this playground answers with 511. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 511

Why did my API return HTML?
A captive portal intercepted the request. 511 is the status a well-behaved portal uses to say so.
Should my server ever send 511?
No — it is intended for network operators' portals, not for origin servers.

Other server error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated