Ana içeriğe geç

HTTP status codes explained

An HTTP status code is the three-digit number a server returns with every response, and its first digit tells you which of five families it belongs to: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error. Read that first digit and you already know whether the request worked, was sent somewhere else, was rejected, or broke.

The most useful thing a status code gives you is a starting point for blame. A 4xx means the server understood the request and refused it, so the problem is normally on the requesting side or in your own routing and access rules: a bad URL, a missing file, an expired credential, a rate limit. With a 5xx the request was fine and your infrastructure could not fulfill it, so look behind your own front door, at an application exception, an upstream service that is down, or a proxy that timed out waiting for a backend. A 3xx is neither a failure nor a finished response. It is an instruction to go somewhere else, and whether it is the right instruction depends entirely on how you configured it.

The guides below cover the codes people look up when a site misbehaves: the whole 3xx redirect family and the difference between a permanent and a temporary redirect, what a plain 200 does and does not prove, why 304 responses are a sign of healthy caching rather than an error, and the 4xx and 5xx codes that show up in real incidents. To see what a URL returns right now, including the full chain of redirects it walks through, run it through the HTTP check tool.

In this section