# 511 Network Authentication Required

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

Canonical: https://scaplet.com/errors/http/511

Guide Error · HTTP status codes

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.

4 min

read

4

sources

Oct 31, 2026

updated

Scaplet Editorial Team

author

511 5xx · Server error

Defined in

RFC 6585, section 6

Who sends it

Intercepting proxies and captive portals, not origin servers

Caching

MUST NOT be stored by a cache

The short answer

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.

1. [What a 511 is, and who sends it](#what-a-511-is-and-who-sends-it)
2. [How a captive portal produces it](#how-a-captive-portal-produces-it)
3. [Fix it as a visitor](#fix-it-as-a-visitor)
4. [Fix it as a site owner or app developer](#fix-it-as-a-site-owner-or-app-developer)
5. [What a 511 does to SEO](#what-a-511-does-to-seo)

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F511%20(%22511%20Network%20Authentication%20Required%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F511%20(%22511%20Network%20Authentication%20Required%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F511%20(%22511%20Network%20Authentication%20Required%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F511%20(%22511%20Network%20Authentication%20Required%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

4 facts from the sources below

RFC 6585, section 6

Defined in

Intercepting proxies and captive portals, not origin servers

Who sends it

MUST NOT be stored by a cache

Caching

5xx server error

Class

_01_511 versus the codes it gets confused with

## What a 511 is, and who sends it

RFC 6585 defines it: the 511 [status code](/glossary/http-status-codes) indicates that the client needs to authenticate to gain network access. The 511 status SHOULD NOT be generated by origin servers; it is intended for use by intercepting proxies that are interposed as a means of controlling access to the network. MDN gives the everyday cases: network operators that require authentication or acceptance of terms before granting access, such as an internet cafe or an airport.

Status

### `401 Unauthorized`

Who is asking for credentials

The origin web server

What you authenticate to

That site or API

Status

### `407 Proxy Authentication Required`

Who is asking for credentials

A proxy the request goes through

What you authenticate to

The proxy

Status

### `511 Network Authentication Required`

Who is asking for credentials

An intercepting proxy or captive portal on the network

What you authenticate to

The network itself (Wi-Fi login, terms of use)

So 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](/glossary/meta-refresh) in its example sends browsers to the login server.

_02_Check it

## How a captive portal produces it

RFC 6585 describes the usual setup. A network operator identifies clients who have not authenticated, often by their MAC addresses. All traffic from those unknown clients is blocked, except traffic on TCP port 80, which goes to an HTTP server dedicated to logging clients in. Your first plain-HTTP request to any site therefore gets the login server's answer.

**HTTPS sites show a certificate error instead**RFC 6585 notes that captive portals using this status on a TLS connection (commonly port 443) will generate a certificate error on the client. If your browser shows a certificate warning on a hotel or airport network, open an `http://` address to reach the portal.

The login server's response, from RFC 6585 section 6.1

```
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>
```

_03_How it works

## Fix it as a visitor

1. 1

### Open a plain HTTP page

Type an `http://` address (not `https://`). Per RFC 6585 the portal answers port 80 traffic, so this is the request it can intercept.
2. 2

### Follow the login link

The 511 body or its meta refresh points at the portal's login page. Sign in or accept the terms there.
3. 3

### Reload the site

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

### Still stuck?

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](/glossary/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.

_04_Check it

## Fix it as a site owner or app developer

Check whether the 511 is yours. A 511 that reaches your users from your own origin breaks RFC 6585's guidance that origin servers should not generate it. Request your site from a network you trust and from an affected one, and compare.

Handle 511 in a client (not from RFC 6585, a suggested pattern)

```
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; }
```

**Do not put the login form in the 511 body**RFC 6585 says the response SHOULD contain a link to a resource that allows the user to submit credentials, and SHOULD NOT contain a challenge or the login interface itself, because browsers would show the login interface as associated with the originally requested URL, which may cause confusion.

See who answered

```
# 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.
```

_05_Explained

## What a 511 does to SEO

[Googlebot](/ai-crawlers/googlebot) is not on a hotel network, so a 511 normally never reaches Google. If one does, or if your own server sends it, Google's guide covers 5xx as a class rather than listing 511: 5xx and 429 errors prompt crawlers to temporarily slow down, indexed URLs are preserved but eventually dropped, and content from a 5xx response is ignored. See [5xx server errors](/seo-issues/server-errors-5xx), [401 Unauthorized](/errors/http/401) and [407 Proxy Authentication Required](/errors/http/407).

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- rfc-editor.org
- mozilla.org
- google.com

1. 01 [RFC 6585: Additional HTTP Status Codes](https://www.rfc-editor.org/rfc/rfc6585.html) rfc-editor.org · checked 2026-11-01
2. 02 [MDN: 511 Network Authentication Required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/511) developer.mozilla.org · checked 2026-11-01
3. 03 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-11-01
4. 04 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-11-01

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What does 511 Network Authentication Required mean?

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.

_02_ How do I get past a 511 on public Wi-Fi?

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.

_03_ Why do I see a certificate error instead of a 511?

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.

_04_ Is 511 a server error I can fix on my website?

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.

## Keep learning

[All errors](/errors)

[Learn HTTP 401 Unauthorized HTTP status codes](/errors/http/401) [Related 5xx server errors Status codes and links](/seo-issues/server-errors-5xx) [Read next HTTP 407 Proxy Authentication Required HTTP status codes](/errors/http/407) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in errors
[Cloudflare error 521: web server is down](/errors/http/521) [Cloudflare error 522: connection timed out](/errors/http/522)

More in HTTP status codes
[426 Upgrade Required](/errors/http/426) [428 Precondition Required](/errors/http/428) [429 Too Many Requests](/errors/http/429) [451 Unavailable For Legal Reasons](/errors/http/451) [502 Bad Gateway](/errors/http/502) [503 Service Unavailable](/errors/http/503) [504 Gateway Timeout](/errors/http/504) [505 HTTP Version Not Supported](/errors/http/505) [506 Variant Also Negotiates](/errors/http/506) [507 Insufficient Storage](/errors/http/507) [508 Loop Detected](/errors/http/508) [510 Not Extended](/errors/http/510) [511 Network Authentication Required](/errors/http/511) [5xx errors](/errors/http/5xx-errors) [HTTP 200 OK](/errors/http/200) [HTTP 201 Created](/errors/http/201) [HTTP 204 No Content](/errors/http/204) [HTTP 206 Partial Content](/errors/http/206) [HTTP 301 Moved Permanently](/errors/http/301) [HTTP 302 Found](/errors/http/302) [HTTP 303 See Other](/errors/http/303) [HTTP 304 Not Modified](/errors/http/304) [HTTP 307 Temporary Redirect](/errors/http/307) [HTTP 308 Permanent Redirect](/errors/http/308)

Terms on this page
[HTTP status codes](/glossary/http-status-codes) [Meta refresh](/glossary/meta-refresh) [Favicon](/glossary/favicon)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
