This HTTP status codes guide breaks down each status code, explaining what it means and how it impacts your website. By understanding these codes, you can diagnose problems, optimise performance, and ensure a seamless user experience. Whether you're troubleshooting a 404 error or handling a 301 redirect, this guide has got you covered.
It's time to understand the essential information that will help you keep your site in top shape and improve its ranking performance in search results. Read on below.
It's time to understand the essential information that will help you keep your site in top shape and improve its ranking performance in search results. Read on below.
1xx Informational
100: Continue- Meaning: The server has received the request headers, and the client should proceed to send the request body.
- Use case: Often seen in web applications, when the client is sending a large POST request and needs to know whether the server is willing to accept it.
- Meaning: The client has asked the server to switch protocols, and the server is acknowledging that it will comply.
- Use case: Used when transitioning from HTTP/1.1 to a newer protocol like WebSockets.
- Meaning: The server has received and is processing the request, but no response is available yet.
- Use case: Typically used in WebDAV applications to indicate that the server is working on the request, which might take a while.
- Meaning: The server is sending some headers to the client before the final response.
- Use case: Useful for improving page load times by allowing the client to start preloading resources while the server prepares the final response.
2xx Successful
200: OK- Meaning: The request was successful, and the server returned the requested resource.
- Use case: The standard response for successful HTTP requests, like fetching a webpage or submitting a form.
- Meaning: The request was successful, and a new resource was created as a result.
- Use case: Commonly seen when uploading a new file or creating a new user in a system.
- Meaning: The request has been accepted for processing, but the processing is not complete.
- Use case: Used when an asynchronous process is initiated, such as submitting a long-running job in a web application.
- Meaning: The server is returning information from a third party, but it is not the original source.
- Use case: When a proxy server modifies the response from an upstream server.
- Meaning: The server successfully processed the request, but is not returning any content.
- Use case: When an update to a resource is successful but there is no need to return updated content.
- Meaning: The server successfully processed the request, and the client should reset the view that sent the request.
- Use case: Used after form submissions to indicate that the form should be cleared.
- Meaning: The server is delivering only part of the resource due to a range header sent by the client.
- Use case: Used for resuming interrupted downloads or splitting a large download into smaller chunks.
- Meaning: The response provides status for multiple independent operations.
- Use case: Frequently used in WebDAV applications to convey the status of multiple sub-requests.
- Meaning: The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again.
- Use case: Reduces duplication of information in multi-status responses.
- Meaning: The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
- Use case: Used in situations where a Delta Encoding in HTTP is applied, allowing clients to receive changes to resources instead of the whole resource.
3xx Redirection
300: Multiple Choices- Meaning: The request has more than one possible response, and the user or user agent should choose one.
- Use case: When different formats of a document are available, and the server provides options to the client.
- Meaning: The resource requested has been permanently moved to a new URL provided by the Location header.
- Use case: Commonly used in URL redirection to indicate that a page has a new permanent location.
- Meaning: The resource requested has been temporarily moved to a different URL, but future requests should use the original URL.
- Use case: Used when redirecting a client to a temporary location, such as during maintenance.
- Meaning: The response to the request can be found under another URL using the GET method.
- Use case: Often used after a PUT or POST operation to redirect the client to a different resource.
- Meaning: The resource has not been modified since the last request.
- Use case: Allows the browser to use its cached version of the resource, saving bandwidth and improving load times.
- Meaning: The requested resource must be accessed through the proxy given by the Location field.
- Use case: Instructs the client to fetch the resource through a specified proxy server.
- Meaning: This code was used in a previous version of the HTTP specification, but is no longer used and reserved.
- Use case: Historically indicated a requested proxy change but is no longer in use.
- Meaning: The requested resource resides temporarily under a different URL, but future requests should still use the original URL.
- Use case: Redirects the client temporarily while maintaining the original request method (e.g., POST).
- Meaning: The resource has been permanently moved to a new URL, and future requests should use the new URL.
- Use case: Similar to 301 but ensures that the request method and body are not changed when redirected.
4xx Client Error
400: Bad Request- Meaning: The server could not understand the request due to invalid syntax.
- Use case: Commonly returned when the client sends malformed request syntax, invalid request message framing, or deceptive request routing.
- Meaning: The client must authenticate itself to get the requested response.
- Use case: Returned when the request requires user authentication, such as accessing a restricted resource.
- Meaning: This status code is reserved for future use.
- Use case: Originally intended for digital payment systems but is not currently used in practice.
- Meaning: The client does not have access rights to the content.
- Use case: Returned when the client’s credentials are understood but they do not have permission to access the resource.
- Meaning: The server can not find the requested resource.
- Use case: Returned when the requested resource is not found on the server, often due to a mistyped URL or a moved resource.
- Meaning: The request method is known by the server but is not supported by the target resource.
- Use case: Returned when a client uses an HTTP method that the resource does not support, such as using POST on a read-only resource.
- Meaning: The server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers.
- Use case: Returned when the server cannot return a response that matches the content-type specified by the client.
- Meaning: The client must first authenticate itself with the proxy.
- Use case: Similar to 401, but authentication is required to be done by a proxy.
- Meaning: The server did not receive a complete request message within the time that it was prepared to wait.
- Use case: Returned when the client takes too long to send a request, often due to network issues or server overload.
- Meaning: The request could not be completed due to a conflict with the current state of the target resource.
- Use case: Returned when there is a conflict in the request, such as an edit conflict between multiple simultaneous updates.
- Meaning: The requested resource is no longer available at the server and no forwarding address is known.
- Use case: Similar to 404, but indicates that the resource is permanently gone and will not be available again.
- Meaning: The server refuses to accept the request without a defined Content-Length header.
- Use case: Returned when the server requires a Content-Length header but it is not provided in the request.
- Meaning: One or more conditions given in the request header fields evaluated to false when tested on the server.
- Use case: Returned when a precondition specified in the request headers is not met, such as If-Match or If-Unmodified-Since.
- Meaning: The request entity is larger than the server is willing or able to process.
- Use case: Returned when the client sends data that is too large, exceeding the server’s capacity or limits.
- Meaning: The URI requested by the client is longer than the server is willing to interpret.
- Use case: Returned when the request URI is too long, often due to too many query parameters or an overly long URL.
- Meaning: The media format of the requested data is not supported by the server.
- Use case: Returned when the server does not support the format of the request payload, such as sending XML data to a JSON API.
- Meaning: The range specified by the Range header field in the request can't be fulfilled.
- Use case: Returned when the client asks for a portion of the file that is outside the available range.
- Meaning: The server cannot meet the requirements of the Expect request-header field.
- Use case: Returned when the server cannot meet an expectation specified in the request’s Expect header.
- Meaning: This code was defined in 1998 as an April Fools' joke, but it is still sometimes used.
- Use case: Used as an Easter egg in some services, referring to the IETF April Fools' joke about a teapot.
- Meaning: The request was directed at a server that is not able to produce a response.
- Use case: Returned when a request is sent to the wrong server, often due to misconfigured DNS or routing.
- Meaning: The request was well-formed but was unable to be followed due to semantic errors.
- Use case: Used in WebDAV when the server understands the content type and syntax but was unable to process the instructions.
- Meaning: The resource that is being accessed is locked.
- Use case: Used in WebDAV to indicate that the resource is currently locked and cannot be modified.
- Meaning: The request failed due to failure of a previous request.
- Use case: Used in WebDAV when a previous request failed, causing the current request to also fail.
- Meaning: The server is unwilling to risk processing a request that might be replayed.
- Use case: Used to prevent replay attacks, indicating that the server wants the client to wait before retrying the request.
- Meaning: The client should switch to a different protocol such as TLS/1.0.
- Use case: Returned when the server requires the client to upgrade to a different protocol.
- Meaning: The origin server requires the request to be conditional.
- Use case: Returned when the server requires that the request include a conditional header like If-Match to prevent accidental modifications.
- Meaning: The user has sent too many requests in a given amount of time ("rate limiting").
- Use case: Commonly returned when a user exceeds the rate limits set by the server.
- Meaning: The server is unwilling to process the request because its header fields are too large.
- Use case: Returned when the request’s header fields are too large, often due to excessive cookies or headers.
- Meaning: The server is denying access to the resource as a consequence of a legal demand.
- Use case: Returned when the server cannot provide access to the resource due to legal reasons, such as censorship or DMCA takedown requests.
5xx Server Error
500: Internal Server Error- Meaning: The server encountered an unexpected condition that prevented it from fulfilling the request.
- Use case: A generic error message when the server throws an exception or encounters an unexpected condition.
- Meaning: The server does not support the functionality required to fulfill the request.
- Use case: Returned when the server does not recognize the request method or lacks the capability to fulfill it.
- Meaning: The server, while acting as a gateway or proxy, received an invalid response from the upstream server.
- Use case: Often seen when a reverse proxy cannot get a valid response from the backend server.
- Meaning: The server is not ready to handle the request.
- Use case: Returned when the server is temporarily unable to handle the request, often due to maintenance or overload.
- Meaning: The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server.
- Use case: Returned when a reverse proxy times out waiting for a response from the backend server.
- Meaning: The server does not support the HTTP protocol version used in the request.
- Use case: Returned when the client uses an HTTP version that the server does not support.
- Meaning: The server has an internal configuration error: the chosen variant resource is configured to engage in content negotiation itself, leading to a circular reference.
- Use case: Rarely used; indicates a misconfiguration in content negotiation.
- Meaning: The server is unable to store the representation needed to complete the request.
- Use case: Used in WebDAV when the server cannot save the requested resource due to lack of storage space.
- Meaning: The server detected an infinite loop while processing the request.
- Use case: Used in WebDAV to indicate that the server terminated an operation because it encountered an infinite loop.
- Meaning: Further extensions to the request are required for the server to fulfill it.
- Use case: Indicates that the request needs further extensions or additional information to be processed.
- Meaning: The client needs to authenticate to gain network access.
- Use case: Commonly used by captive portals to require network authentication before granting access.