4314xx Client ErrorMedium
HTTP 431 Request Header Fields Too Large
Defined in RFC 6585
What Does HTTP 431 Mean?
The server is unwilling to process the request because its header fields are too large, either individually or collectively.
Common Causes
- 1Too many or too large cookies
- 2Oversized Authorization token
- 3Excessive custom headers
- 4Cookie accumulation from many subdomains
Impact
- ⚠Website fails to load
- ⚠API requests rejected
- ⚠Must clear cookies or reduce header size
Ad Space – header
Developer Fix
For web developers and application engineers
- 1Reduce cookie size and count
- 2Use shorter JWT tokens or reference tokens
- 3Move large data from headers to request body
- 4Clear unnecessary cookies
Server Admin Fix
For system administrators and DevOps engineers
- 1Increase header size limits in server configuration
- 2Configure large_client_header_buffers in nginx
- 3Adjust LimitRequestFieldSize in Apache
- 4Monitor for header size trends
Ad Space – after-fix
Frequently Asked Questions
How do I fix 431 errors caused by cookies?
Clear your browser cookies for the affected domain. If you're a developer, reduce cookie sizes, use fewer cookies, limit cookie domains, and consider using session storage instead.
What's the typical header size limit?
Nginx defaults to 8KB total headers. Apache defaults to 8,190 bytes per header line. Node.js defaults to 16KB. Increase these limits if your application legitimately needs larger headers.
Related HTTP Status Codes
About the Author
Web Infrastructure Team
Verified against official RFC specifications and real-world server configurations. HTTP status code behavior confirmed across Apache, Nginx, and Cloudflare.