Guide

How to fix a 400 Bad Request error

A 400 Bad Request error, often with "Request Header Or Cookie Too Large" underneath, means the website refused what your browser sent. Clearing that site's cookies is the usual fix.

In short: a website leaves small notes (cookies) in your browser, and your browser hands them all back with every page you ask for. When the pile gets too big, or one note is garbled, the site refuses the whole request. Clearing that site's cookies empties the pile.

1. What you'll see

Chrome
This page isn't working, then If the problem continues, contact the site owner. and HTTP ERROR 400 at the bottom.
HTTP ERROR 431
The same problem with a different number: the "headers" your browser sent (the notes that travel with every request, cookies included) are too big for the site.
The site's own page
400 Bad Request with Request Header Or Cookie Too Large underneath, or Your browser sent a request that this server could not understand. Some add Size of a request header field exceeds server limit.

A different number? See 401 Unauthorized and 429 Too Many Requests, 403 Forbidden, 404 Page Not Found or 500 Internal Server Error.

2. If you're visiting a site

  1. Check the address. A typo, a space or a stray % sign in a pasted link can cause a 400. Go to the site's home page and find the page from there.
  2. Clear that one site's cookies:
    • Chrome: More (the three dots) › Settings › Privacy and security › Third-party cookies › See all site data and permissions, search for the site, then Delete.
    • Edge: Settings and more (the three dots) › Settings › Privacy, search, and services › Cookies › See all cookies and site data, search for the site, click the down arrow next to it, then Delete.
    • Safari (Mac): Safari › Settings › Privacy › Manage Website Data, select the site, then Remove. On an iPhone: Settings › Apps › Safari › Advanced › Website Data, and remove the site from the list.
    • Firefox: while you're on the site, click the padlock in the address bar, then Clear cookies and site data.
    • Chrome on an Android phone: go to the site, tap More (the three dots) › Site controls › Cookies, then tap Delete next to the stored data.
    • Chrome on an iPhone or iPad: Google's help gives no way to clear just one site, so this clears cookies for every site and signs you out of them. Tap More › Settings › Privacy and Security › Delete Browsing Data, tick only Cookies, Site Data, then tap Delete Browsing Data twice and Done.
  3. Load the page again. You'll need to sign in to that site again, but nothing else changes.
  4. Still there? Try a private (incognito) window. If it works there, it's something saved in your browser: clear your cache as well.
  5. If it fails everywhere, on every device, the site needs fixing. Tell the business, with the time it happened.

Clearing cookies doesn't switch them off. If the site then won't keep you signed in, check that you haven't turned cookies off for it.

Stuck, and someone's helping you? Send them your details with My setup.

This one is almost always about cookies. Your browser has saved more of them for that site than its server will read, so it turns every page away. It isn't a virus and it isn't your internet. Clear the site's cookies with the steps above and it goes away, until the pile builds up again.

4. Why do I keep getting "Bad Request"?

Mozilla's web documentation says a 400 is typically down to a badly formed request, and that sending the same request again unchanged will fail the same way. So reloading won't help; something in the request has to change. The usual suspects, most likely first:

  • Too many cookies for that site. Mozilla lists too many cookies as a common cause of the related 431 error. Clear that one site's cookies, as above.
  • A damaged link. A pasted address cut in the wrong place, with a space in it or an odd symbol, can be refused. Go to the home page and find the page from there.
  • A very long address. Mozilla also lists a very long Referer address (the page you came from) as a cause of 431. Opening the page from a bookmark or the home page instead avoids it.
  • Something on your side changing the request, such as a browser add-on, a VPN or a work network. A private window with add-ons off tells you.

If it happens to the same site every few weeks, the site is saving a growing pile of cookies. That's the site's problem to fix: see below.

5. If it's your site

  1. One visitor? Ask them to clear your site's cookies (send them this page).
  2. Lots of visitors, with "Cookie Too Large"? Something on your site is saving too many cookies, or too big ones. Think about what you added just before it started: a plugin, a chat box, a sign-up form, a tracking or ad tool. Your web person can find which cookies grow, and your host can raise the size limit while that's fixed.
  3. A 400 on one form or one link usually means the address or the form sends something the server can't read. Your web person can see the details in the server's error log.

Link Check reports any link on your pages that answers with a 400 as a dead link, and Site health shows what your home page answers. Neither sends your visitors' cookies, so a cookie problem won't show up there: ask someone who has it to try a private window.

The short version

Visiting? Clear the cookies for that one site, then reload. Your site? Something on it is saving too many or too big cookies: send your web person the message below.

Send this to your web person

Not sure what to say? Copy this into an email, add your website's address, and send it.

Hi,

People are getting a 400 Bad Request error on [your website address], on [the page, or every page]. [The page says "Request Header Or Cookie Too Large".] It started around [the date and time]. Clearing the site's cookies fixes it for a while.

Could you find which cookies our site saves that keep growing, and what added them? If it's quicker, could the host raise the header size limit while that's fixed? Please tell me what you changed.

Thanks

Know someone this would help? Share it

Quick question

Did this guide help with your problem?