Request with content, no Transfer-Encoding
- Rule (RFC 9110, section 8.6)
- A user agent SHOULD send
Content-Lengthwhen the method defines a meaning for enclosed content
The HTTP Content-Length header gives the size of the message body in bytes. See when to send it, when not to, what a 411 means, and how to check yours.
The HTTP Content-Length header indicates the size, in bytes, of the message body sent to the recipient. MDN says the message size must be known up front, before the headers are sent, which is a problem for dynamically generated or streamed content. HTTP/1.1 can use Transfer-Encoding: chunked instead, and in HTTP/2 the header is redundant.
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.
Content-Length tells the receiver how many bytes of message body to expect. RFC 9110 defines it as the representation's data length as a decimal non-negative integer number of octets, for example Content-Length: 3495. It lets recipients delimit the message, measure transfer progress, know when a received message is complete, and potentially reuse the connection for more requests.
It appears in requests (POST bodies) and responses. The same RFC says a client normally sends it on a POST request even when the value is 0, indicating empty content.
Transfer-EncodingContent-Length when the method defines a meaning for enclosed contentTransfer-Encoding)The last row exists for security. The RFC warns that a value inconsistent with the received message framing might cause a security failure due to request smuggling or response splitting.
In HTTP/1.1, Transfer-Encoding: chunked can replace Content-Length for responses sent in parts as their size is calculated, per MDN.
MDN says Content-Length is redundant because the length can be inferred from DATA frames, though it may still be included for backwards compatibility. See HTTP/2.
RFC 9110 says a sender must not forward a message with a value known to be incorrect. If something in your stack rewrites the body, such as compression, the value has to describe the body that is actually sent. See gzip compression.
RFC 9110 defines the 411 Length Required status: the server refuses to accept the request without a defined Content-Length. The client may repeat the request if it adds a valid header containing the length of the request content. See 411 Length Required. For uploads the server rejects as too big, see 413 Content Too Large. Both belong to the wider family of HTTP status codes.
On a static, uncompressed file the two numbers should match. If they differ, something between you and the origin changed the body, or the server computed the length differently for HEAD. If Content-Length is missing and Transfer-Encoding: chunked is present, the response is sent in parts.
curl -sI https://example.com/ | grep -i -E 'content-length|transfer-encoding|content-encoding'
curl -s https://example.com/ | wc -cPeople also search "content length" meaning word count. Google's helpful content guidance asks whether you're writing to a particular word count because you've heard that Google has a preferred word count, and answers: no, it doesn't. Length should follow what the reader needs.
5 questions people ask next, answered from the sources on this page.
A header that indicates the size, in bytes, of the message body sent to the recipient. RFC 9110 defines it as a decimal non-negative integer number of octets.
In HTTP/1.0 it is required, per MDN. In HTTP/1.1 it can be replaced with Transfer-Encoding: chunked for responses sent in parts, and in HTTP/2 it is redundant.
The server refuses to accept the request without a defined Content-Length. Add a valid header with the length of the request content and retry.
RFC 9110 says there is no predefined limit to the length of content, so a recipient must anticipate potentially large numbers. Servers can still set their own limits and answer 413.
No. Google's guidance says it does not have a preferred word count.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.