Skip to the content
Start free

400 Bad Request

400 Bad Request is the HTTP status code a server sends when it will not process a request because it thinks the request itself is wrong, for example broken syntax, a damaged form body or a malformed address. It is a client error: the fault is in what was sent, not in the server. Sending the same request again without changing it will fail the same way.

What is a 400 Bad Request? #

Every answer a web server gives starts with a three-digit HTTP status code. Codes from 400 to 499 mean “something about your request is wrong”. 400 is the general one in that family. The HTTP standard, RFC 9110, says the server “cannot or will not process the request” because of something it sees as a client error. MDN names three usual reasons: malformed request syntax, invalid message framing and deceptive request routing.

Put simply, the server could not make sense of what arrived. It is not saying the page is missing (that is a 404 or 410) or that you are not allowed (that is 403). It is saying the message itself was broken.

What causes it? #

The common causes on real websites are small and boring:

  • A broken address. A URL with a stray % sign, a space or a character that was never encoded. Our URL Encoder and Decoder shows what a safe version looks like.
  • Bad form or API data. MDN’s own example is a JSON body with line breaks in the wrong place. The server cannot read it, so it answers 400 instead of creating the record.
  • Too many or too large cookies. A browser that has piled up cookies can send headers the server refuses. The tidy answer for this is 431, which MDN says is often caused by a long Referer address or too many cookies. Many servers just send a plain 400.
  • Odd query strings. A tracking tool or plugin adds a URL parameter that a firewall or app rejects.
  • A missing or wrong Host header. A request that does not say which site it wants can be refused at the door.

Google treats a 400 like any other client error. Its page on how HTTP status codes affect Google’s crawlers puts every 4xx code apart from 429 in one bucket. Google does not use the content. If a page that used to work now answers with a 4xx code, it is removed from the index over time, and Googlebot visits it less and less.

That means a 400 on a real page is as bad as a 404 for that page. It drops out. The same Google page also says 4xx codes, apart from 429, have no effect on crawl rate, so a 400 will not protect a busy server either. If the real problem is load, see rate limiting.

A 400 also shows up as a crawl error in reports. In Google Search Console, look at the page indexing report for addresses blocked by a 4xx issue.

Why does it matter for AI answers? #

AI tools fetch pages the same way. OpenAI’s GPTBot (an AI crawler), or any live fetcher that reads a page while answering a question, gets the same 400. It has nothing to read, so it cannot quote you. Some firewalls send 400 to unusual user agents. If your rules were written before AI assistants existed, check what they send to them with our AI Bot Checker.

How does it work? #

A browser or bot sends a request: a method (GET or POST), an address, some HTTP headers and sometimes a body. The server, or something in front of it like a CDN or a web application firewall, checks the request. If a rule fails before the page is built, it answers 400 and stops. Often the origin server never sees it.

That last point matters when you look for the cause. Your site’s own logs may be empty, because the layer in front made the decision.

Common mistakes #

  • Using 400 for everything. Some apps send 400 for “not found” or “not allowed”. That hides the real problem. Use 404, 410 or 403 when they fit.
  • Sending 400 with a normal page. The reverse is just as bad: an error message on a page that answers 200 is a soft 404.
  • Blaming the visitor. If many people hit the same 400, it is your link, form or rule that is broken.
  • Bad links you made yourself. An internal link with a typo or a broken character sends every visitor and bot into the error. See broken link and internal linking.
  • Odd campaign links. A hand-typed UTM link with a space in it can break. Build them with our UTM Builder.

A worked example #

A small shop runs a sale email. The link in the email ends in ?utm_campaign=Black Friday%. The space and the lone % break the address.

Request Answer What happens
/sale/?utm_campaign=Black Friday% 400 Visitors see an error page; the sale gets no clicks
/sale/?utm_campaign=black-friday 200 Page loads; the campaign is counted
/sale/ from Googlebot 200 The page itself stays indexed

Here only the email link was broken. The page was fine. Fixing the link fixed the problem, and nothing changed in search. If the same bad address had been in the site menu, Googlebot would have hit it too.

How to check it #

  1. Open the address in our HTTP Header Checker. It shows the exact status code and headers that come back.
  2. If the address redirects first, follow every hop with our Redirect Checker. A 400 at the end of a redirect chain is easy to miss.
  3. Run our Broken Link Checker on the page that links to the error to find every bad link on it.
  4. Split a long address into parts with the URL Parser to spot the broken piece.
  5. For API errors, paste the request body into the JSON Formatter. It points to the line that is not valid.
  6. Clear cookies for the site and try again. If the error goes, oversized cookies were the cause.
  7. Read your server logs and any firewall log to see which rule fired. In URSY Pro, the Log file analyser groups error codes by bot and page, and 404s with referrer shows which page sent people to a dead address.
  8. Ask Search Console’s URL Inspection tool which code Googlebot received last time.

Questions #

Is a 400 error my fault or the visitor’s? #

By the standard it is a client error. In practice, if a link you published causes it, the fix is yours.

Will Google drop my page for one 400? #

Google says a URL that now returns 4xx stops being used over time. One short glitch is unlikely to matter. A page that answers 400 for weeks will drop out.

Should I redirect 400 errors? #

Usually no. Fix the bad link or the rule that rejects good requests. A redirect only helps if a real old address has moved.

Can a 400 be cached? #

It can, by a CDN or browser. After a fix, clear that cache if the error still shows. See cache purge.

Sources #

Updated 24 November 2026 by URSY.

Cite this page: 400 Bad Request. URSY. Updated 24 November 2026. https://ursy.com/wiki/400-bad-request/ · Section links

Tools for this

All 871 wiki entries, A to Z →