Free auditStart free
GuideError · HTTP status codes

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.

3 min
read
4
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
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
  2. How to get past a 411 as a visitor
  3. How to find and fix it as a developer
  4. 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 withChatGPTClaudePerplexityGoogleAI Mode
02Explained

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.

03How 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."}
04Explained

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 and Google's documentation on how HTTP status codes affect its crawlers. Related: 413 Content Too Large and 400 Bad Request.

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. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-10-25
  2. 02RFC 9112: HTTP/1.1, Section 6.2rfc-editor.org · checked 2026-10-25
  3. 03MDN: 411 Length Requireddeveloper.mozilla.org · checked 2026-10-25
  4. 04How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-10-25
Questions

Asked a lot.

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

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

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

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

04Should I retry a 411?

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

Free · 2 minutes

Tools point. Agencies advise. This one ships.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane