Error 400 Bad Request: the cookie that is too big and other causes

The short answer: error 400 means “the request the browser sent is malformed or too big”. In most cases, the cause is a cookie that grew until the request passed the size the server accepts. Deleting that site’s cookies almost always fixes it.

The most common causes

Cause How to recognise it What to do
Huge or too many cookies The error shows on one site, in one browser; on another device or in a private tab it works. It may say “Request Header Or Cookie Too Large”. Delete the cookies of that site only (in the browser settings, under “Cookies and site data”) and reload.
An address with characters it cannot have The link has spaces, accents or symbols (such as a malformed %). Type the address again. If the link comes from a program of yours, encode it: a space is %20.
A request that is too big The error appears when submitting a form with a lot of text or many fields. Reduce what you send. The limit is on the server: PHP limits.
A plugin or program that keeps creating cookies The cookies grow back quickly after being deleted. Deactivate what creates the cookies (often a statistics or session tool) and see: Tag Manager and pixels.
Something in between (Cloudflare, a firewall) The 400 error shows only through the protection, and not through the server’s direct address. Tell us: we need to see who returns the error.

For the site owner

1 Reproduce with a private tab. If it works, the browser’s cookies are the cause and the site has no fault.
2 If it affects many people, the site is setting too many cookies: see which ones, and how big, in the browser’s “Application” tab, and reduce them.
3 Do not raise the server limit to “fix” it: it hides the problem and makes every request heavier.
Delete only the cookies of the site with the problem. Deleting all the browser’s cookies makes you lose sessions logged in elsewhere. For the other errors, see Website errors explained.

Does it affect all your visitors and you do not know why? Open a ticket with the address and the exact text of the error.

Open a support ticket

SEE ALSO

Website errors explained: 500, 403, 404, 508 and what to do

Clearing the cache: the browser’s, the computer’s, and the site’s

The cookie notice and consent: what your site collects without you knowing

PHP limits: memory, time, upload size and the one that fails silently

RECOMMENDED PRODUCT

Web hosting with cPanel

Domain and SSL included, daily backups and the panel you already know. from $5.36/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?