Skip to content
4xx · Client Error

411 Length Required

The server refuses the request because it lacks a Content-Length header.

What it means

HTTP 411 Length Required means the server will not accept a request that has a body but no Content-Length header. Some servers insist on knowing the size of the payload up front rather than reading an unbounded stream, and they reject the request until the client states the length.

When it happens

It happens when a client sends a POST or PUT without a Content-Length, often from a hand-rolled HTTP request or a misconfigured client that streams a body without declaring its size.

How to fix it

  • Add an accurate Content-Length header to the request.
  • If the body is generated on the fly, buffer it so its length is known, or use chunked transfer encoding where the server supports it.
  • Check the HTTP client library is not stripping the header before the request goes out.

SEO impact

None for normal pages. It affects request bodies, and crawlers fetch pages with simple GET requests that have no body.

Check it with Sitewell

Find out which of your URLs return 411

Paste a list of URLs and Sitewell checks the status code of every one at once — free and without signup.

Related codes

Related guides