⚠️ “431 Request Header Fields Too Large” Error – What It Is and How to Fix It
Adam C. |

If you’ve recently seen an error like:

431 Request Header Fields Too Large  
Apache/2.4.52 (Ubuntu) Server

Don’t worry — it’s a known issue, and here’s what it means (plus how to resolve it).

Photo by No Revisions on Unsplash

🧠 What is a 431 Error?

This error occurs when your browser sends too much data in the request headers — usually due to large or excessive cookies stored for the site. Web servers like Apache and Nginx have limits on how much header data they can process. If those limits are exceeded, access is denied, and the 431 error is triggered.

🔍 What Caused It in My Case?

In my case, the error was caused by a cookie named acv, which had grown to over 3.4KB in size. Combined with other tracking and consent cookies (from ad partners and CMPs), the total header size pushed Apache beyond its default threshold — leading to a sitewide access issue for users.

Worse, once it happened, visitors had to manually clear cookies just to get back in.

🛠️ How I Fixed It (as a Site Owner)

I implemented three changes:

Increased the Apache header limits by adding this to the server config:

LimitRequestFieldSize 16384
LimitRequestLine 8190

Created a custom 431 error page (/431.html) that now explains the issue and offers:

A “Clear Cookies” button to quickly reset

A contact link to report issues

Monitored cookie size and behavior, especially from 3rd-party ad/CMP scripts, to catch anything unusually large or persistent.

👩‍💻 If You’re a Visitor and See This Error

Try clearing cookies for the site

Refresh the page

Or use the contact form on the error page to get help

📌 Final Note

If you run a site with ad tech integrations or a CMP, it’s a good idea to monitor cookie sizes and server limits. A single cookie update from a vendor can break access for users without warning.

Adding a custom error page and a way for users to recover quickly goes a long way in preserving trust and usability.