Fix “Request Header Or Cookie Too Large”
The error means a site has saved too many cookies on you. Deleting them fixes it.
You may see one of these instead of the page:
- 400 Bad Request: Request Header Or Cookie Too Large
- 431 Request Header Fields Too Large
- Bad Request: Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.
Every time Chrome asks a site for a page, it sends that site's cookies along with the request. Many servers refuse a request whose headers are bigger than about 8 KB. A site that has piled up cookies over time, often from analytics or ads, can push you past that limit, and then every page fails, including the login page.
Fix it
- Stay on the error page.
- Click the cookieZ icon. Next to the cookie count it shows roughly how big the site's cookies are, and it warns you above 6 KB.
- Under the delete options, choose This page. That's every cookie Chrome sends to this address, including ones set for the whole domain.
- Click Delete, then Yes, delete, then reload.
You'll be signed out of that site, but not any other. If you'd rather keep your login, sort the table by size, delete the biggest cookies first and mark your login cookie as Kept. If other parts of the site still fail, repeat with This domain and its subdomains.
Without an extension, you can clear the site in Chrome's own settings instead. See Clear cookies for one site in Chrome.
If it keeps coming back
The site, or something on it, keeps adding cookies. cookieZ's Block button can block other companies' cookies on that site, which keeps its own cookies so signing in still works. See Block cookies on one site.
If you run the site
Every cookie set for your domain is sent with every request to it, including requests for images and scripts. Some ways to stay under the limit:
- Set cookies on the narrowest domain and path that needs them, rather than the whole domain.
- Keep session data on the server and put only an ID in the cookie.
- Check what third-party scripts set on your domain. Analytics and testing tools often add several cookies each.
- Raise the server's limit if you have to:
large_client_header_buffersin nginx,LimitRequestFieldSizein Apache, or--max-http-header-sizein Node.js.
To see where the bytes go, open cookieZ on your site and sort by size. The Large badge marks cookies close to Chrome's 4 KB limit for a single cookie.
cookieZ is free, has no ads and makes no network requests. Its code is public.
Guides: Clear cookies for one site · Block cookies on one site · Block third-party cookies · Export cookies from Chrome · cookies.txt for yt-dlp · Cookies set before you accept