411 Length Required

HTTP 411 Length Required is a 4xx client error status. The server refuses the request because it has no Content-Length header.

411Status code
4xxClient error
NoCacheable by default
RFC 9110 §15.5.12Defined in

Common causes

What to do

Send the body with a known length.

Example response

HTTP/1.1 411 Length Required
Content-Type: application/problem+json

{"status":411,"title":"Length Required"}

Returning 411 in code

Express   res.status(411).json({ … });
Flask     return jsonify(…), 411
PHP       http_response_code(411);
Go        w.WriteHeader(411)
nginx     return 411;

Other 4xx codes

Frequently asked questions

What does HTTP 411 mean?
The server refuses the request because it has no Content-Length header.
Is 411 an error?
Yes. It is a client error: the request needs to change before retrying.
Does a 411 hurt SEO?
If search engines see it repeatedly on pages that should rank, those pages can be dropped from the index. Fix it quickly.