# 411 Length Required

> A 411 means the server refuses a request body without a Content-Length header. Why chunked or streamed uploads trigger it, and how to fix the client or gateway.

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

Guide Error · HTTP status codes

A 411 means the server refuses a request body without a Content-Length header. Why chunked or streamed uploads trigger it, and how to fix the client or gateway.

3 min

read

4

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

411 4xx · Client error

The short answer

A 411 Length Required error means the server refuses to accept the request because it has no Content-Length header. It typically hits POST or PUT requests sent with chunked transfer encoding or a streamed body. The client caused it. Add a valid Content-Length, or buffer the body so its size is known, and repeat the request.

1. [What a 411 means and who causes it](#what-a-411-means-and-who-causes-it)
2. [How to get past a 411 as a visitor](#how-to-get-past-a-411-as-a-visitor)
3. [How to find and fix it as a developer](#how-to-find-and-fix-it-as-a-developer)
4. [What it does to SEO](#what-it-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%2F411%20(%22411%20Length%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%2F411%20(%22411%20Length%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%2F411%20(%22411%20Length%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%2F411%20(%22411%20Length%20Required%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_Where a 411 comes from

## What a 411 means and who causes it

RFC 9110 says 411 (Length Required) "indicates that the server refuses to accept the request without a defined Content-Length". It adds that "The client MAY repeat the request if it adds a valid [Content-Length header](/glossary/content-length) field containing the length of the request content."

Cause

### Client sends the body with Transfer-Encoding: chunked

Where to look

Request headers in DevTools or curl -v

Fix

Send a fixed Content-Length instead

Cause

### Streamed upload with unknown size

Where to look

Your HTTP client's streaming mode

Fix

Buffer to a file or memory to learn the size, then send

Cause

### Gateway or API front end needs a length first

Where to look

The proxy or API gateway docs

Fix

Send Content-Length, or change the gateway setting if you own it

Cause

### Hand-built request with a body but no length

Where to look

Your request code

Fix

Add Content-Length equal to the body byte count

This is a client-side error from the server's point of view, but the real culprit is often a gateway. RFC 9112 explains that "a client that sends a request containing a message body SHOULD use a valid Content-Length header field if the message body length is known in advance, rather than the chunked transfer coding, since some existing services respond to chunked with a 411 (Length Required) [status code](/glossary/http-status-codes) even though they understand the chunked transfer coding". It says this is "typically because such services are implemented via a gateway that requires a content length in advance of being called". RFC 9112 also notes "A server MAY reject a request that contains a message body but not a Content-Length".

_02_Explained

## How to get past a 411 as a visitor

A browser sets Content-Length for you on normal form posts, so a visitor rarely sees a 411. If you do, retry the action, try another browser, and turn off extensions that rewrite requests. If it keeps happening on an upload, tell the site owner what you were uploading, because the fix is on the client or gateway side.

_03_How it works

## How to find and fix it as a developer

1. 1

### Replay the request

Use curl -v and check whether the request has Content-Length or Transfer-Encoding: chunked.
2. 2

### Send a defined length

If the body size is known, set Content-Length to its byte length. Once the header is present, the server can accept the request.
3. 3

### Buffer streamed bodies

If your library streams a body of unknown size, it falls back to chunked. Write the body to memory or disk first, then send it with a length.
4. 4

### Check the gateway

If the same request works when sent straight to the origin, a gateway in front requires the length. Check its docs and settings.
5. 5

### Return a clear body

If you run the server, explain the requirement in the 411 response, as MDN's example does.

Reproduce and fix with curl

```
# Chunked body: some gateways answer 411 curl -v -X POST https://api.example.com/translate/de \ -H 'Content-Type: application/json' \ -H 'Transfer-Encoding: chunked' \ -d '{"text": "Hello"}' # Defined length: send an explicit Content-Length curl -v -X POST https://api.example.com/translate/de \ -H 'Content-Type: application/json' \ -H 'Content-Length: 17' \ -d '{"text": "Hello"}'
```

A useful 411 response (MDN example)

```
HTTP/1.1 411 Length Required Content-Type: application/json {"message": "Requests must have a content length header."}
```

_04_Explained

## What it does to SEO

Google's documentation lists 411 among the 4xx codes, which it does not index, and says it treats all 4xx errors except 429 the same way. A 411 is a response to a request that carries a body, such as an upload or API call, not to a plain GET for a page, so it rarely matters for rankings. See [4xx errors](/seo-issues/4xx-errors) and Google's documentation on how HTTP status codes affect its crawlers. Related: [413 Content Too Large](/errors/http/413) and [400 Bad Request](/errors/http/400).

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 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-10-25
2. 02 [RFC 9112: HTTP/1.1, Section 6.2](https://www.rfc-editor.org/rfc/rfc9112.html) rfc-editor.org · checked 2026-10-25
3. 03 [MDN: 411 Length Required](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/411) developer.mozilla.org · checked 2026-10-25
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-10-25

Questions

## Asked a lot.

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

_01_ What does HTTP 411 Length Required mean?

The server refuses the request because it has no Content-Length header. The client can repeat it with a valid length.

_02_ Does every POST need a Content-Length header?

A request with a body needs a defined length or chunked framing. RFC 9112 says a server MAY reject a body without Content-Length, so some servers do.

_03_ Why do I get 411 when I send a chunked request?

The service or the gateway in front of it needs the length before handling the request, even though chunked is valid HTTP/1.1.

_04_ Should I retry a 411?

Yes, but only after adding a valid Content-Length. Repeating the same chunked request gives the same result.

## Keep learning

[All errors](/errors)

[Learn HTTP 400 Bad Request HTTP status codes](/errors/http/400) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next 413 Request Entity Too Large HTTP status codes](/errors/http/413) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in errors
[HTTP 408 Request Timeout](/errors/http/408) [HTTP 409 Conflict](/errors/http/409) [HTTP 412 Precondition Failed](/errors/http/412)

More in HTTP status codes
[HTTP 499 Client Closed Request](/errors/http/499) [HTTP 500 Internal Server Error](/errors/http/500) [HTTP 501 Not Implemented](/errors/http/501) [HTTP redirect codes](/errors/http/http-redirect-codes) [HTTP status code list](/errors/http/http-status-code-list) [REST API status codes](/errors/http/rest-api-status-codes) [100 Continue](/errors/http/100) [101 Switching Protocols](/errors/http/101) [402 Payment Required](/errors/http/402) [403 Forbidden](/errors/http/403) [404 Not Found](/errors/http/404) [406 Not Acceptable](/errors/http/406) [411 Length Required](/errors/http/411) [413 Request Entity Too Large](/errors/http/413) [414 URI Too Long](/errors/http/414) [415 Unsupported Media Type](/errors/http/415) [416 Range Not Satisfiable](/errors/http/416) [417 Expectation Failed](/errors/http/417) [418 I'm a Teapot](/errors/http/418) [421 Misdirected Request](/errors/http/421) [422 Unprocessable Content (Unprocessable Entity)](/errors/http/422) [423 Locked](/errors/http/423) [424 Failed Dependency](/errors/http/424) [425 Too Early](/errors/http/425)

Terms on this page
[Content-Length (HTTP header)](/glossary/content-length) [HTTP status codes](/glossary/http-status-codes)

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
