Every HTTP response begins with a three-digit status code, sent before any content. This code indicates whether the request succeeded, was redirected, or failed, and provides a general reason why. The first digit of the code determines its class. There are five classes in total, and understanding them is enough to interpret most status codes correctly on sight.
1xx – Informational
The server received the request and continues processing it. Applications rarely encounter these codes directly, as they are typically handled at the protocol level.
| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | The server has received the initial part of the request. The client can continue sending the remainder, including the request body. |
| 101 | Switching Protocols | The server agrees to switch protocols, as requested by the client. This is most commonly used to upgrade a connection to WebSocket. |
2xx – Success
The request was successfully received, understood, and accepted.
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | The request succeeded. This is the standard response for a successful HTTP request. |
| 201 | Created | The request succeeded and resulted in the creation of a new resource, typically in response to a POST request. |
| 202 | Accepted | The request has been accepted for processing, but processing is not yet complete. Commonly used for asynchronous or background operations. |
| 204 | No Content | The request succeeded, but the response intentionally contains no content. Commonly returned after a DELETE or PUT request. |
| 206 | Partial Content | The server is returning only part of the resource, corresponding to a byte range specified by the client. This mechanism supports resumable downloads and media streaming. |
3xx – Redirection
The client must take additional action to complete the request, typically by requesting a different URL.
| Code | Name | Meaning |
|---|---|---|
| 301 | Moved Permanently | The requested resource has been permanently moved to a new URL. Clients and search engines should update their references to the new location. |
| 302 | Found | The requested resource is temporarily available at a different URL. The client should continue to use the original URL for future requests. |
| 304 | Not Modified | The resource has not changed since the client's last request. The client can use its cached copy instead of downloading the content again. |
| 307 | Temporary Redirect | The requested resource is temporarily available at a different URL. Unlike 302, the client must repeat the request using the same HTTP method and body at the new URL. |
| 308 | Permanent Redirect | The requested resource has permanently moved to a new URL. Unlike 301, the client must repeat the request using the same HTTP method and body at the new URL. |
4xx – Client Error
The request contains an error that the client must correct, such as an invalid URL or missing authentication.
| Code | Name | Meaning |
|---|---|---|
| 400 | Bad Request | The server cannot process the request due to a client error, such as malformed syntax that prevents the request from being parsed. |
| 401 | Unauthorized | The request requires authentication. The client did not provide credentials, or the credentials provided are invalid. |
| 403 | Forbidden | The server understood the request but refuses to authorize it. Unlike 401, providing different credentials will not resolve this — access is explicitly denied. |
| 404 | Not Found | The server cannot find the requested resource at this URL. The server itself is reachable and functioning normally. |
| 405 | Method Not Allowed | The resource exists, but does not support the HTTP method used in the request — for example, a POST request sent to an endpoint that only supports GET. |
| 408 | Request Timeout | The server timed out waiting for the client to complete the request. |
| 409 | Conflict | The request could not be completed because it conflicts with the current state of the resource. This commonly occurs with concurrent edit operations. |
| 410 | Gone | The requested resource is no longer available and has been permanently removed. Unlike 404, this indicates the removal was intentional. |
| 413 | Payload Too Large | The request body exceeds the size limit that the server is willing or able to process. |
| 415 | Unsupported Media Type | The server does not support the format of the request body. |
| 422 | Unprocessable Entity | The request is syntactically correct but contains semantic errors. The server understands the request format but cannot process the data it contains. |
| 429 | Too Many Requests | The client has sent too many requests in a given time period. The server is enforcing rate limiting. |
5xx – Server Error
The server failed to fulfill a valid request. These errors indicate a problem on the server side, not with the client's request.
| Code | Name | Meaning |
|---|---|---|
| 500 | Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. |
| 501 | Not Implemented | The server does not support the functionality required to fulfill the request. |
| 502 | Bad Gateway | A server acting as a gateway or proxy received an invalid response from an upstream server. |
| 503 | Service Unavailable | The server is temporarily unable to handle the request, typically due to overload or scheduled maintenance. |
| 504 | Gateway Timeout | A server acting as a gateway or proxy did not receive a timely response from an upstream server. |
| 505 | HTTP Version Not Supported | The server does not support the HTTP protocol version specified in the request. |
4xx vs. 5xx: Determining Responsibility
This distinction is essential when diagnosing HTTP errors. A 4xx status code indicates that the client must modify the request — for example, by using a different URL, providing valid credentials, or reducing the request rate. A 5xx status code indicates that the request was valid and the problem originated on the server; no change to the client request will resolve it. A 502 or 504 status code typically indicates an issue with a proxy, load balancer, or upstream service, rather than the application server itself.
If a domain unexpectedly begins returning a different status code than usual, verify that its DNS records are not pointing to an incorrect server before investigating further.
Frequently Asked Questions
What's the difference between 401 and 403?
401 means the request lacks valid credentials — logging in or providing the right credentials can resolve it. 403 means the server understood who's asking and is explicitly denying access anyway — different credentials won't change the outcome.
What's the difference between 301 and 302?
301 is a permanent redirect — browsers and search engines are meant to remember it and update their references to the new URL going forward. 302 is temporary — the client should keep using the original URL for future requests, since the new location might only be temporary.
Is a 404 a sign the server is broken?
No — a 404 actually confirms the opposite: the server is reachable and functioning normally, it just doesn't have anything at that specific URL. A broken server typically returns a 5xx code or no response at all, not a 404.
What's the difference between a 502 and a 503?
Both point to an upstream problem rather than the application itself. 502 (Bad Gateway) means a proxy or load balancer got an invalid response from the backend. 503 (Service Unavailable) means the backend is deliberately not accepting requests right now, often mid-deploy or under heavy load.
A site suddenly started returning a different status code — what should I check first?
Rule out a DNS change first — a domain pointing at the wrong server will produce a status code that has nothing to do with the actual application, and that's a more common cause of a sudden change than the application itself breaking.
Use the HTTP header checker to inspect the status code, redirect chain, and headers for any URL.