400 Bad Request The Server Cannot Understand the Request
Fix HTTP 400 Bad Request (’Cookie Too Large’) by clearing oversized site cookies, fixing broken URL characters, and trimming large form file uploads.
Overview & Technical Context
HTTP status 400 Bad Request means the destination web server received your browser’s request cleanly—no firewall or DNS failure occurred—yet rejected it outright because the incoming URL, query parameter, upload size, or cookie headers broke strict formatting rules. While web developers hit 400 from malformed JSON/API payloads, everyday web visitors encounter "400 Bad Request — Request Header or Cookie Too Large" (especially on Nginx and Cloudflare sites) when months of bloated session, consent, or tracking cookies outgrow the server’s 8 KB–16 KB header buffer limit! Trimming URL clutter, deleting site-specific cookies, and resetting cache instantly unlocks the page.
Specific Symptoms
- Opening a bookmarked dashboard or shopping domain prints
400 Bad Request — Request Header or Cookie Too Large. - Visiting the site in an Incognito tab loads smoothly without any error while your main browser fails.
- Uploading oversized photos or entering forbidden special characters into search forms triggers instant HTTP 400.
- Stale DNS lookups send requests to an old host rejecting unfamiliar
Host:headers.
Why This Error Occurs
- Accumulated site cookies or bloated auth headers exceeded server
large_client_header_buffers(often 8 KB). - Typo or unencoded illegal characters (
%signs, stray spaces, broken characters) corrupted the address URL. - File uploads exceeded server form-size caps or malformed file extensions broke multipart upload forms.
- Outdated browser cache or corrupted local DNS mapped traffic onto the wrong virtual host.
Troubleshooting Steps
Delete accumulated cookies specifically for that website
Click the padlock or tune controls beside the browser URL bar → Cookies and site data → Manage on-device site data, clear ALL stored cookies for that domain (clearing google.com or big retail sites if multiple subdomains store giant cookie jars), and press Ctrl + Shift + R cleanly.
Inspect the URL for typos, stray percent codes, or huge query strings
Check the browser address bar for copied trailing spaces, broken % URL encodings, or giant tracking parameters (?fbclid=... / old SSO state= strings). Strip everything after the main path cleanly down to https://example.com and press Enter.
Test smaller files or verify upload formats if hitting 400 on forms
When HTTP 400 fires right after submitting a profile avatar or document upload, confirm the file size sits below the site limit (e.g., under 5 MB / 10 MB), rename filenames removing odd symbols (#, %, emojis), and reload the page first so stale CSRF tokens refresh.
Flush Windows DNS cache and test Incognito extensions
Run ipconfig /flushdns if DNS propagation recently shifted virtual hosts, and check Incognito mode (Ctrl + Shift + N) so privacy extensions that inject broken headers (X-Forwarded-For, User-Agent spoofers) don’t malformed-tag requests.
ipconfig /flushdns
What to Check If the Issue Continues
If you run an Nginx or Apache website returning 400 Request Header or Cookie Too Large onto users with multiple corporate SAML/AD groups, inspect cookie bloat in your application login logic rather than masking unlimited header sizes permanently.
Frequently Asked Questions
Why does Nginx say "Request Header Or Cookie Too Large" under HTTP 400?
Sites frequently stack marketing pixels, A/B test cookies, and oversized JWT auth tokens on every visit until the combined Cookie: header crosses Nginx’s default 8 KB buffer cap, triggering HTTP 400 until the user clears site cookies.
How is HTTP 400 Bad Request different from HTTP 404 Not Found?
404 means the server understood your syntax fine yet no document lives at that path; 400 means the HTTP request itself broke syntax, encoding, or header limits before routing even ran.
Can browser User-Agent switcher extensions cause HTTP 400?
Yes! Outdated header-editing or referrer-spoofing extensions frequently insert non-ASCII characters or truncated header tokens that strict reverse proxies immediately reject with HTTP 400.
Does clearing my browser cookies erase saved bookmarks or passwords?
No! Clearing cookies strictly logs you out of active website sessions while leaving Chrome bookmarks, history, and saved passwords intact.
Search Another Error or Symptom
Search all 292 guides and tools on SolveKits: