🌐 HTTP errors

HTTP status codes from 400 Bad Request to 504 Gateway Timeout — what they mean and how to fix them on any server.

CodeErrorWhat it means
200 HTTP 200 OK (but something is still wrong) The request succeeded at the HTTP level — yet the page is blank, the data is wrong, or an error is hidden ins…
304 HTTP 304 Not Modified The cached copy is still valid, so the server sends no body and the client reuses its cache.
400 HTTP 400 Bad Request The server could not understand the request because its syntax, headers or body are malformed or invalid.
403 HTTP 403 Forbidden The server understood the request but refuses to authorize it — you (or the server process) are not allowed t…
410 HTTP 410 Gone The resource used to exist but was intentionally and permanently removed, with no forwarding address.
301 HTTP 301 Moved Permanently The resource has a new permanent URL; clients and search engines should use the address in the Location heade…
302 HTTP 302 Found (Temporary Redirect) The resource is temporarily at another URL; clients should keep using the original URL for future requests.
401 HTTP 401 Unauthorized The request has no valid authentication credentials — you need to log in or send a valid token.
404 HTTP 404 Not Found The server can’t find anything at the requested URL.
405 HTTP 405 Method Not Allowed The URL exists, but it doesn’t accept the HTTP method you used (e.g. POST to a GET-only route).
406 HTTP 406 Not Acceptable The server can’t produce a response in any format listed in the request’s Accept headers.
407 HTTP 407 Proxy Authentication Required A proxy between you and the server requires credentials before it will forward your request.
408 HTTP 408 Request Timeout The server closed the connection because the client took too long to send the complete request.
409 HTTP 409 Conflict The request conflicts with the current state of the resource — e.g. a duplicate or an edit based on an outdat…
411 HTTP 411 Length Required The server refuses a request with a body but no Content-Length header.
412 HTTP 412 Precondition Failed A conditional request header (If-Match, If-Unmodified-Since) didn’t match the current state of the resource.
413 HTTP 413 Content Too Large (Request Entity Too Large) The request body is bigger than the server is willing to accept — usually a file upload over the configured l…
414 HTTP 414 URI Too Long The request URL (usually the query string) is longer than the server will accept.
415 HTTP 415 Unsupported Media Type The server refuses the request because the body’s Content-Type isn’t one it accepts.
422 HTTP 422 Unprocessable Content The request is well-formed, but the data fails validation (e.g. invalid email, missing required field).
428 HTTP 428 Precondition Required The server requires a conditional request (If-Match / If-Unmodified-Since) to prevent lost updates, and you d…
429 HTTP 429 Too Many Requests You’ve hit a rate limit — too many requests in a given time window. Slow down and retry later.
431 HTTP 431 Request Header Fields Too Large The request headers — almost always cookies — exceed the server’s size limit.
499 HTTP 499 Client Closed Request (Nginx) Nginx-specific code logged when the client disconnected before the server finished responding.
500 HTTP 500 Internal Server Error The server hit an unexpected condition — usually an unhandled exception or misconfiguration in the applicatio…
501 HTTP 501 Not Implemented The server doesn’t support the functionality (usually the HTTP method) needed to fulfil the request.
502 HTTP 502 Bad Gateway A proxy or gateway (Nginx, load balancer, CDN) got an invalid response — or no response — from the upstream s…
503 HTTP 503 Service Unavailable The server is temporarily unable to handle the request — overloaded, in maintenance, or has no healthy backen…
504 HTTP 504 Gateway Timeout A proxy or gateway waited too long for the upstream server to respond and gave up.
505 HTTP 505 HTTP Version Not Supported The server doesn’t support the HTTP protocol version used in the request.