Client error · 400

400 Bad Request

A 400 Bad Request means the server parsed enough of the request to reject it as invalid. The host is reachable. The method, URL, headers, or body is what it will not accept.

HTTP status codes explained · the longer reference on the blog.

What 400 means

The status belongs to the client-error class. A well-behaved server sends it when the request is malformed: a broken query string, a body that does not match Content-Type, a missing required field, or a header the app cannot read. The response should explain the problem. Many apps instead return a generic page, which makes the code look like an outage.

Browsers rarely show a 400 on an ordinary page load, because a normal navigation is a simple GET. You will see it on form posts, API calls, and webhooks. An uptime check is a GET with a short set of headers. If that GET returns 400, the URL itself is being rejected, or a filter in front of the app is rejecting the checker’s request.

Common causes

  • The URL or query string is invalid

    A percent-encoding mistake, a raw space, a truncated query, or a parameter the app treats as required can all produce 400 before any business logic runs.

  • The body does not match the declared type

    JSON posted as text/plain, a form posted as JSON, or an empty body when the route requires one. API gateways often answer 400 for this before the app sees the call.

  • A header is oversized or illegal

    Cookies that have grown past the server’s header limit, a duplicated Content-Length, or a non-ASCII header value. nginx returns 400 when the request line or headers are too large.

  • A WAF or validation layer rejected the request

    ModSecurity, Cloudflare WAF, or an app firewall can answer 400 for a pattern it dislikes. The origin logs may show nothing, because the request never arrived.

How to fix it

  • Read the response body

    APIs often include a field name or a parser error. A blank HTML 400 from nginx usually points at the request line or header size, not at application code.

  • Retry the exact request with curl

    Send the same method, path, and content type from a terminal. If curl gets 200 and the browser gets 400, compare cookies and extra headers the browser adds.

  • Raise or fix header limits only if logs say so

    Look for “request header or cookie too large” in the proxy error log. Trim cookies before you raise large_client_header_buffers. A huge cookie is a bug, not a capacity plan.

  • Check the WAF event log

    If the edge blocked the request, the origin will look healthy. Adjust the rule or the request. Do not turn the firewall off to hide the status.

Is it your site, or just you?

Open the URL in a private window with extensions disabled. A 400 that follows one cookie or one extension is on that client. A 400 on a clean GET of a public page is on the server or the WAF.

The homepage checker performs its own GET and shows the status it received. If it also reports 400, other callers without your cookies can hit the same rejection. If it reports 200, compare what your client is sending.

How to monitor for 400

Monitor the public URL you expect to return 200. A 400 on that URL fails the check, because the default expected status is 200. For an API that legitimately returns 400 on a bad body, monitor a health route that accepts a plain GET instead of alerting on every validation error.

The checker on the ismysiteup homepage requests the URL from our servers and shows the HTTP status, response time, and SSL details. No account is required, and that checker allows 5 checks per hour from the same network. A free account watches 5 URLs, each checked every 10 minutes, and sends alerts on WhatsApp, Telegram, Slack, or email. A monitor expects HTTP 200 unless you set a different expected status (100–599). One failed check is confirmed with a second check before the first alert, and a later success sends a recovery alert. Pro (every 5 minutes) and Business (every minute) are listed on the pricing page; paid checkout is not open yet.

Compare Free, Pro, and Business

Related status codes

FAQ

Is a 400 Bad Request an outage?

Usually no. The server is up and is refusing this request. It becomes an outage for a page only when a normal visit, with no special body, receives 400.

How is 400 different from 422?

A 400 means the server could not understand the request as sent. A 422 Unprocessable Content means the syntax was fine and the instructions were understood, but the content could not be processed. Many APIs use 400 for both.

Will a monitor alert on HTTP 400?

Yes, when 400 is not the expected status. The default expected status is 200, so a public page that starts returning 400 is treated as down after a confirming check.