431 Request Header Fields Too Large
The request headers are too big
Seen in Node.js, browsers, APIs
The server refused the request because one header, or all headers together, are larger than it allows.
Common causes
- Too many or oversized cookies for the domain, common on localhost where many apps share cookies.
- A very large Authorization token or custom header.
- Node.js's default header size limit (16 KB).
How to fix it
- Clear the cookies for the site (or for localhost) and reload.
- Store less in cookies; keep large session data server-side.
- For Node.js, raise the limit only if needed: node --max-http-header-size=32768 server.js
Got a different message? Paste it into the error explainer.
Related errors
- 408 Request Timeout · The client took too long to send its request
- 413 Request Entity Too Large · The request body is bigger than the server allows
- 400 Bad Request: Request Header Or Cookie Too Large · nginx rejected oversized headers or cookies
- 499 Client Closed Request · The client gave up before nginx answered
- Error 524: A timeout occurred · Your origin took longer than 100 seconds to respond
- Error 530 · Cloudflare could not reach the origin; see the 1xxx error on the page
- Error 1003: Direct IP access not allowed · A Cloudflare IP was requested without a hostname
- Error 1010: The owner of this website has banned your access based on your browser's signature · Your browser looks like a bot to the site's security settings
- Error 1015: You are being rate limited · You sent too many requests to a Cloudflare site
- Error 1020: Access denied · A Cloudflare firewall rule blocked your request
- Error 1033: Argo Tunnel error · The Cloudflare Tunnel for this hostname is not connected
- Error 1101: Worker threw exception · A Cloudflare Worker crashed with a JavaScript error