Network Authentication Required
5xx Server Error
Last updated:
The client needs to authenticate to gain network access (e.g. captive portal at a Wi-Fi hotspot).
Description
Signals that a network intermediary (not the origin server) requires the client to authenticate before further network access is granted.
When to use
Emitted by captive-portal systems, not by application servers.
Specification
RFC 6585
Examples
HTTP response
HTTP/1.1 511 Network Authentication Required
Content-Type: application/json
{"error":"Network Authentication Required"}Node.js (Express)
res.status(511).json({ error: "Network Authentication Required" });Go (net/http)
w.WriteHeader(http.Status511)
Python (Flask)
return jsonify({"error": "Network Authentication Required"}), 511