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
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.
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.
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.
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 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".
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.
Use curl -v and check whether the request has Content-Length or Transfer-Encoding: chunked.
If the body size is known, set Content-Length to its byte length. Once the header is present, the server can accept the request.
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.
If the same request works when sent straight to the origin, a gateway in front requires the length. Check its docs and settings.
If you run the server, explain the requirement in the 411 response, as MDN's example does.
# 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"}'HTTP/1.1 411 Length Required
Content-Type: application/json
{"message": "Requests must have a content length header."}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 and Google's documentation on how HTTP status codes affect its crawlers. Related: 413 Content Too Large and 400 Bad Request.
4 questions people ask next, answered from the sources on this page.
The server refuses the request because it has no Content-Length header. The client can repeat it with a valid length.
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.
The service or the gateway in front of it needs the length before handling the request, even though chunked is valid HTTP/1.1.
Yes, but only after adding a valid Content-Length. Repeating the same chunked request gives the same result.
Run the free audit, then approve the fixes. Every change can be undone.