How to read HTTP status codes
Every time a browser, app or API client makes an HTTP request, the server answers with a three-digit status code. That number is the quickest way to know what happened: whether the request succeeded, was redirected, was rejected as a client mistake, or failed on the server. The first digit puts the code into one of five classes, and the remaining two digits identify the specific situation.
The five classes are 1xx (informational — the server received the request and work is continuing), 2xx (success — the request was received, understood and accepted), 3xx (redirection — the client must take an additional step, usually following a new URL), 4xx (client error — the request was malformed or not allowed) and 5xx (server error — the server failed to fulfil a valid request). The reference below lists every standard code in each class with a one-line meaning.
301. The leading 3 tells you it is a redirect; the full code, 301 Moved Permanently, tells you the resource has a new permanent home and clients should update their links — whereas 302 Found would mean the move is only temporary.Frequently asked questions
- What are HTTP status codes?
- HTTP status codes are three-digit numbers a server returns with every response to tell the client how the request went. They are grouped into five classes by their first digit: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error.
- What does 404 mean?
- 404 Not Found means the server could not find the requested resource at that URL. The address may be mistyped, or the page may have been moved or deleted. It is a client error in the 4xx class.
- What does 500 mean?
- 500 Internal Server Error is a generic server-error response in the 5xx class. Something went wrong on the server while handling the request — such as an unhandled exception or misconfiguration — and it cannot be more specific.
- What is the difference between 301 and 302?
- Both redirect to a new URL, but 301 Moved Permanently means the move is permanent, so browsers and search engines update and cache the new link. 302 Found is a temporary redirect, so the original URL should keep being used.
- What is a 403?
- 403 Forbidden means the server understood the request but refuses to authorise it. Unlike 401, signing in will not help — you simply do not have permission to access that resource.
- What does 200 mean?
- 200 OK is the standard success response in the 2xx class. It means the request succeeded and the server is returning the data you asked for, such as the page or file.