401 Unauthorized
- Who is asking for credentials
- The origin web server
- What you authenticate to
- That site or API
A 511 comes from the network, not the website: a captive portal wants you to log in. How to clear it, how to spot a fake 511, and how apps should handle it.
A 511 Network Authentication Required means the network you are on, not the website, wants you to log in or accept terms first. RFC 6585 says origin servers should not generate it; intercepting proxies and captive portals do. Open a plain http:// page to reach the login page, authenticate, then retry. If your own site sends 511, fix that.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
401 Unauthorized407 Proxy Authentication Required511 Network Authentication RequiredSo a 511 is not a fault of the site you were trying to open. It is the network replying in the site's place. The status exists so that software that expects an answer from the real server, especially non-browser clients, can tell the difference. RFC 6585 states that the 511 assures non-browser clients will not interpret the response as being from the origin server, and the meta refresh in its example sends browsers to the login server.
GET /index.htm HTTP/1.1
Host: www.example.com
HTTP/1.1 511 Network Authentication Required
Content-Type: text/html
<html>
<head>
<title>Network Authentication Required</title>
<meta http-equiv="refresh"
content="0; url=https://login.example.net/">
</head>
<body>
<p>You need to <a href="https://login.example.net/">
authenticate with the local network</a> in order to gain
access.</p>
</body>
</html>Type an http:// address (not https://). Per RFC 6585 the portal answers port 80 traffic, so this is the request it can intercept.
The 511 body or its meta refresh points at the portal's login page. Sign in or accept the terms there.
After you authenticate, retry the original URL. The 511 response must not be stored by a cache, so a normal reload should show the real site.
Switch networks, for example to mobile data, and retry. If the site loads there, the problem is the first network's portal, and the operator is the person to ask.
A stale favicon is a known side effect. RFC 6585 Appendix B explains that a favicon fetched from a captive portal can stick in the browser's cache beyond the portal session, so the portal's icon appears to have taken over the real site.
const res = await fetch(url);
if (res.status === 511) {
// The network, not the origin, answered. Do not parse, cache or retry
// this body as if it came from your API.
showNotice('Sign in to the network, then try again.');
return;
}# From the affected network: plain HTTP shows the portal's answer
curl -i http://example.com/
# Read the status line, the Server and Via headers, and the body.
# A 511 whose body links to login.<network>.example is the network,
# not your site.4 questions people ask next, answered from the sources on this page.
The client needs to authenticate to gain network access. The response comes from an intercepting proxy such as a captive portal on the network, not from the website you asked for.
Open a plain http:// page so the portal can intercept it, follow the login link in the response, and accept the terms or sign in. Then reload the site you wanted.
RFC 6585 says captive portals that use this status on a TLS connection, commonly port 443, generate a certificate error on the client. An http:// address avoids that.
Only if your own origin sends it. RFC 6585 says origin servers should not generate 511. If your users see it on one network only, the network operator controls the portal.
Run the free audit, then approve the fixes. Every change can be undone.