Skip to the content

431 Request Header Fields Too Large

The headers of the request are too big for the server, one of them or all together. Oversized cookies are the usual cause.

Class
4xx Client error. The request is the problem: a wrong address, missing credentials, data the server can't accept.
Defined in
RFC 6585

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What causes it

When the total size of the headers, or a single one of them, goes over the limit of the server. Cookies are sent along with every request and grow unnoticed: a site that keeps adding to them ends up sending more than the server accepts. A very long Referer address or a large authorization token can do the same.

What to do about it

As a visitor: delete the cookies for that site and reload.

As the developer: find out what is filling the headers, and keep large data out of cookies. Raising the limit of the server treats the symptom. Many servers answer 400 in this situation and not 431; nginx is one of them.

Not to be confused with

400 Bad RequestWhat many servers send for the same problem.
413 Content Too LargeThe body is too large, not the headers.
414 URI Too LongThe address is too long.

All codes are on the list of HTTP status codes, which can be searched by number and by word.

See all 12