431 Request Header Fields Too Large

HTTP 431 Request Header Fields Too Large is a 4xx client error status. The headers are too big, either one header or all together.

431Status code
4xxClient error
NoCacheable by default
RFC 6585Defined in

Common causes

What to do

Clear cookies for the site or trim custom headers.

Example response

HTTP/1.1 431 Request Header Fields Too Large
Content-Type: application/problem+json

{"status":431,"title":"Request Header Fields Too Large"}

Returning 431 in code

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

Other 4xx codes

Frequently asked questions

What does HTTP 431 mean?
The headers are too big, either one header or all together.
Is 431 an error?
Yes. It is a client error: the request needs to change before retrying.
Does a 431 hurt SEO?
If search engines see it repeatedly on pages that should rank, those pages can be dropped from the index. Fix it quickly.