HTTP Status Code Reference
HTTP status codes are three-digit numbers returned by the server in response to a request from a browser or other client. They are a crucial tool for web interaction, indicating whether the request was successfully processed, whether a redirect is required, or whether an error occurred. Understanding these codes is essential for web developers, SEO specialists, and system administrators to debug, monitor, and optimize web resources. All codes are divided into five classes, defined by the first digit.
1xx: Informational Codes
The codes in this group provide information about the request processing process. They are intermediate and do not indicate either success or error.
100 - Continue
The server informs the client that it has received the initial request headers and the client may continue transmitting the request body (if any). This is used for optimization to avoid transmitting large amounts of data for a known invalid request.
101 - Switching Protocols
The server agrees to switch protocols as requested by the client. For example, this code is used to migrate from HTTP/1.1 to WebSocket.
102 - Processing
The server has received the request and is processing it, but the response is not yet ready. This prevents the client from timing out while the server performs a lengthy operation (for example, processing a large file).
2xx: Success Codes
This group indicates that the request was successfully received, understood, and processed.
200 - OK
The standard success response code. The request was successful, and the server is returning the requested data (for example, an HTML page or file contents).
201 - Created
The request was successful, and as a result, a new resource was created (for example, after submitting a form using the POST method). The response typically contains a Location header with the URI of the created resource.
202 - Accepted
The request was accepted for processing, but processing has not yet been completed. This is often used for asynchronous operations that occur on the server without direct communication with the client.
204 - No Content
The server successfully processed the request but does not return any content in the response body. This is often used for requests where only confirmation of the action is required (e.g., deleting a resource).
206 - Partial Content
The server returns only part of the data. This is used when downloading large files in parts (e.g., when resuming a broken download or for streaming video).
3xx: Redirect Codes
These codes indicate that the client must take additional action to complete the request, typically navigating to a different URL.
301 - Moved Permanently
The requested resource has been permanently moved to a new URI. All subsequent requests should use the new URL. This is important for SEO, as it transfers the SEO value of the old page to the new one.
302 - Found
The requested resource is temporarily available at a different URI. The browser should navigate to the new URL, but continue to use the original URL for future requests. This does not transfer SEO value.
304 - Not Modified
Used for caching. The server informs the client that the requested version of the resource has not changed since the last request. The client can safely use the cached version.
307 - Temporary Redirect
Similar to code 302, but with an important caveat: the method and body of the original request must not change when re-requesting. A more secure version of code 302.
308 - Permanent Redirect
Similar to code 301, but also ensures that the method and body of the request remain unchanged. A stricter and more predictable version of code 301.
4xx: Client Errors
Codes in this group indicate that the error occurred due to the client"s fault – the request contains invalid syntax or cannot be fulfilled.
400 - Bad Request
The server cannot process the request due to invalid syntax. A common cause is malformed headers or request body.
401 - Unauthorized
Authentication is required to access the resource. The client must authenticate by sending valid credentials (e.g., username and password).
403 - Forbidden
The server understood the request but refuses to authorize it. Unlike 401, authentication will not help, as the client simply does not have permission to access the resource.
404 - Not Found
The most recognizable error code. The server cannot find the requested resource. Possible causes include: an invalid link, a deleted page, or a typo in the URL.
405 - Method Not Allowed
The request method (GET, POST, etc.) is known to the server but is not supported for this resource. For example, attempting to send a POST request to a read-only URL (GET).
408 - Request Timeout
The server decided to close the connection because the client did not send a complete request within the allotted time.
409 - Conflict
The request cannot be fulfilled due to a conflict with the current state of the resource. This often occurs when the same data is being edited concurrently (for example, a version conflict in a version control system).
410 - Gone
The resource is no longer available and has been permanently deleted. Unlike 404, this implies that the page existed but was deleted.