What are HTTP Status Codes? List Of Important Status Codes
Updated by Chima Mmeje — November 11, 2024.
What are HTTP status codes?
An HTTP status code is a server response to a browser’s request. When you visit a website, your browser sends a request to the site’s server, and the server then responds to the browser’s request with a three-digit code: the HTTP status code, which indicates that the server is communicating the status of the request.
These status codes are the Internet equivalent of a conversation between your browser and the server. They communicate whether things between the two are A-okay, touch-and-go, or whether something is wrong. Understanding status codes and how to use them will help you to diagnose site errors quickly to minimize downtime on your site. You can even use some of these status codes to help search engines and people access your site; a 301 redirect, for example, will tell bots and people that a page that has moved somewhere else permanently.
The first digit of each three-digit status code begins with one of five numbers, 1 through 5; you may see this expressed as 1xx or 5xx to indicate status codes in that range. Each of those ranges encompasses a different class of server response, including an invalid response.
Brief history of HTTP status codes
HTTP status codes have been around since the early days of the web, tracing back to 1991 with the introduction of the HTTP/0.9 protocol. Initially, these codes were quite basic, offering only a few options to indicate the outcome of a request. As the internet grew and HTTP became more widely adopted, the need for a more detailed and nuanced set of status codes became apparent.
In 1996, the HTTP/1.1 protocol was introduced, bringing with it a comprehensive set of status codes organized into five distinct classes. Each class had its own specific meaning and purpose, allowing for more precise communication between clients and servers. Over the years, new status codes have been added to address emerging needs and use cases. For instance, the 410 Gone status code was introduced in 1999 to signify that a resource has been permanently deleted, while the 429 Too Many Requests status code was added in 2014 to indicate that a client has exceeded the rate limit for a particular resource.
Today, there are over 70 HTTP status codes in use, each serving a unique function. These codes are crucial for the smooth and efficient operation of the web, ensuring that clients and servers can communicate effectively and handle various scenarios appropriately.
HTTP request and response
When a client, such as a web browser, interacts with a server, it sends an HTTP request message. This message includes a request method, like GET or POST, and a set of request header fields that provide additional context about the request. These headers can include information such as the client’s preferred language, the type of data it can accept, and any authentication credentials.
Upon receiving the request, the server processes it and returns an HTTP response message. This response includes a status code, which indicates the outcome of the request, and a set of response header fields that offer further details about the response. The status code is a critical part of the response, as it informs the client whether the request was successful, if there was an error, or if further action is needed. An invalid response can occur if the server encounters an issue processing the request.
Request method and request header fields
The request method is a fundamental component of the HTTP request message, specifying the action the client wants the server to perform on the requested resource. Common request methods include:
- GET: Retrieve a resource.
- POST: Create a new resource.
- PUT: Update an existing resource.
- DELETE: Remove a resource.
Request header fields provide additional information about the request, enhancing the communication between the client and server. These headers can include details such as the client’s preferred language, the types of data it can accept, and any necessary authentication credentials. By including this information, the client ensures that the server can process the request more effectively and return a relevant response.
Common HTTP status code classes:
Here’s a broad list of HTTP status code classes and subclasses:
Informational status codes (1xx)
Informational status codes, also known as 1xx status codes, are used to indicate that the server has received the request and is in the process of handling it. These codes provide interim information about the request and are not the final response.
Common informational status codes include:
- 100 continue: The server has received the request headers and the client should proceed to send the request body.
- 101 switching protocols: The server is switching to a different protocol, such as from HTTP to WebSocket.
- 102 processing: The server has received the request and is processing it, but no response is available yet.
These codes are valuable for providing feedback to the client about the progress of the request, helping to improve the overall user experience by keeping the client informed about the status of their request.
Successful status codes (2xx)
Successful status codes, also known as 2xx status codes, indicate that the client’s request was successfully received, understood, and accepted by the server. These status codes are used to confirm that the request has been fulfilled and the response is being sent back to the client.
- 200 OK: This status code indicates that the request has succeeded. The information returned with the response depends on the method used in the request. For example, a GET request will return the requested resource, while a POST request will return the result of the action performed.
- 201 created: This status code means that the request has been fulfilled and has resulted in the creation of a new resource. This is commonly seen in response to a POST request.
- 202 accepted: The request has been accepted for processing, but the processing has not been completed. This status code is useful for asynchronous operations.
- 203 non-authoritative information: The server successfully processed the request, but the returned metainformation is not the definitive set as available from the origin server. This can happen when the server is acting as a proxy.
- 204 no content: The server has successfully fulfilled the request but does not need to return an entity-body. This is often used when the server wants to indicate that the action has been successfully applied but there is no need to change the current document view.
- 205 reset content: The server has fulfilled the request, and the user agent should reset the document view that caused the request to be sent. This is typically used to clear form fields after a successful submission.
- 206 partial content: The server has fulfilled the partial GET request for the resource. This is used when the client has requested only a portion of the resource, such as when resuming a download.
Redirection status codes (3xx)
Redirection status codes, also known as 3xx status codes, indicate that further action needs to be taken by the user agent to fulfill the request. The required action may be carried out by the user agent without interaction with the user if the method used in the second request is GET or HEAD.
- 300 multiple choices: The requested resource corresponds to any one of a set of representations, each with its own specific location. The user agent or user should choose one of them.
- 301 moved permanently: This status code indicates that the requested resource has been assigned a new permanent URI, and any future references to this resource should use one of the returned URIs.
- 302 found: The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client should continue to use the original URI for future requests.
- 303 see other: The response to the request can be found under a different URI and should be retrieved using a GET method on that resource. This status code is typically used to redirect after a POST request.
- 304 not modified: If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server should respond with this status code. This helps to reduce bandwidth usage by reusing cached data.
- 305 use proxy: The requested resource must be accessed through the proxy given by the Location field. This status code is not widely used due to security concerns.
- 306 (unused): This status code was used in a previous version of the specification but is no longer used and is reserved for future use.
- 307 temporary redirect: The requested resource resides temporarily under a different URI. The method and the body of the original request are reused to perform the redirected request.
- 308 permanent redirect: This status code indicates that the requested resource has been permanently assigned a new URI, and any future references should use the new URI. Unlike 301, the method and the body of the original request are reused to perform the redirected request.
Client error status codes (4xx)
Client error status codes, also known as 4xx status codes, indicate that the client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation.
- 400 bad request: The server could not understand the request due to malformed syntax. The client should not repeat the request without modifications.
- 401 unauthorized: The request requires user authentication. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
- 402 payment required: This status code is reserved for future use and is not currently implemented.
- 403 Forbidden: The server understood the request but refuses to authorize it. This is often due to insufficient permissions.
- 404 not found: The server has not found anything matching the Request-URI. No indication is given whether the condition is temporary or permanent.
- 405 method not allowed: The method specified in the Request-Line is not allowed for the resource identified by the Request-URI. For example, a POST request on a read-only resource.
- 406 not acceptable: The requested resource is only capable of generating response entities that have content characteristics not acceptable according to the accept headers sent in the request.
- 407 proxy authentication required: This status code is similar to 401 (Unauthorized), but it indicates that the client must first authenticate itself with the proxy.
- 408 request timeout: The client did not produce a request within the time that the server was prepared to wait. The client may repeat the request without modifications at any later time.
- 409 conflict: The request could not be completed due to a conflict with the current state of the resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request.
- 410 gone: The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent.
- 411 length required: The server refuses to accept the request without a defined Content-Length. The client may repeat the request if it adds a valid Content-Length header field.
- 412 precondition failed: The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.
- 413 request entity too large: The server is refusing to process a request because the request entity is larger than the server is willing or able to process.
- 414 request-URI too long: The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.
- 415 unsupported media type: The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.
- 416 requested range not satisfiable: The server should return this status code if a request included a Range request-header field, and none of the range-specifier values in this field overlap the current extent of the selected resource.
- 417 expectation failed: The expectation given in an Expect request-header field could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.
Server error status codes (5xx)
Server error status codes, also known as 5xx status codes, indicate cases in which the server is aware that it has erred or is incapable of performing the request.
- 500 internal server error: The server encountered an unexpected condition that prevented it from fulfilling the request. This is a generic error message indicating that the server cannot process the request due to an internal issue.
- 501 not implemented: The server does not support the functionality required to fulfill the request. This status code indicates that the server does not recognize the request method or lacks the ability to fulfill the request.
- 502 bad gateway: The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
- 503 service unavailable: The server is currently unable to handle the request due to temporary overloading or maintenance of the server. This status code indicates that the server will be available again in the future.
- 504 gateway timeout: The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI.
- 505 HTTP version not supported: The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.
- 506 variant also negotiates: The server has an internal configuration error: the chosen variant resource is configured to engage in transparent negotiation itself, making it an improper endpoint in the negotiation process.
- 507 insufficient storage: The method could not be performed on the resource because the server is unable to store the representation needed to complete the request successfully.
- 508 loop detected: The server has detected an infinite loop while processing the request. This status code indicates that the server terminated an operation because it encountered an infinite loop.
- 510 not extended: Further extensions are required for the server to be able to fulfill the request. This status code indicates that the request cannot be processed until additional extensions are provided.
- 511 network authentication required: The client needs to authenticate to gain network access. This status code indicates that the client must authenticate itself to gain access to the network.
From the above mentioned, these are the most important status codes for SEOs
It’s important for every professional SEO and website owner to understand the status codes that have the biggest impact on SEO. Once you understand the cause of the issue, you can look at implementing a custom 404 page, or look into using the all-powerful 301 redirect to send visitors to the right place.
HTTP Status Code 200 - OK
This is your ideal status code for your normal, everyday, properly functioning page. Visitors, bots, and link equity pass through linked pages like a dream. You don't need to do anything and you can happily go about your day secure in the knowledge that everything is just as it should be.
HTTP Status Code 301 - Permanent Redirect
A 301 redirect should be utilized any time one URL needs to be redirected to another permanently. A 301 redirect means that visitors and bots that land on that page will be passed to the new URL. In addition, link equity — the power transmitted by all those hard-earned links to your content — is also passed to the new URL through a 301 redirect. Despite talk from Google that all 3xx redirects are treated equally, tests have shown this is not completely true. A 301 redirect remains the preferred method of choice for permanent page redirects. Clients should continue to use the original request URI for any future requests because the redirection may change over time.
HTTP Status Code 302 - Temporary Redirect
A 302 redirect is similar to a 301 in that visitors and bots are passed to the new page, but link equity may not be passed along. We do not recommend using 302 redirects for permanent changes. Using 302s will cause search engine crawlers to treat the redirect as temporary, meaning that it may not pass along the link equity that the magical 301 does.
HTTP Status Code 404 - Not Found
This means the file or page that the browser is requesting wasn’t found by the server, resulting in a 404 error code. 404s don’t indicate whether the missing page or resource is missing permanently or only temporarily. You can see what this looks like on your site by typing in a URL that doesn’t exist. It’s like hitting a brick wall. Just as you’ve experienced, your visitors will hit a page that has a 404 error and either try again (if you’re lucky) or wander away to another site that has the information they’re seeking.
Every site will have some pages that return 404 status codes. These pages don’t always have to be redirected; there are other options. One common misconception is that it’s an SEO best practice to simply 301 redirect pages that return a 404 status code to the homepage of the given domain. This is actually a bad idea for the majority of cases, because it can confuse users who may not realize that the webpage they were trying to access doesn’t exist.
If the pages returning 404 codes are high-authority pages with lots of traffic or have an obvious URL that visitors or links are intended to reach, you should employ 301 redirects to the most relevant page possible. For example, if your page on sugar-free cupcakes no longer exists, you may want to redirect this URL with a 301 to your sugar-free recipe category page.
Outside of these instances, it may be necessary for a URL return a 404 on purpose — this will keep them from getting indexed and repeatedly crawled by search engines. Give your visitors the best experience possible with a custom 404 page, as suggested by this Google Search Console guide. For example, e-commerce sites often produce 404 pages when products go out of stock, so these sites are great candidates for creating a custom e-commerce 404 page.
HTTP Status Code 410 - Gone
A 410 is more permanent than a 404; it means that the page is gone. The page is no longer available from the server and no forwarding address has been set up. Any links you have on your site that are pointing to a 410 page are sending bots and visitors to a dead resource, so if you see them, remove any references or links to them from your content.
The origin server has permanently removed the resource.
HTTP Status Code 500 - Internal Server Error: Status Code Indicates
Instead of the problem being with pages missing or not found, this status code indicates a problem with the server. A 500 is a classic server error and will affect access to your site. Human visitors and bots alike will be lost, and your link equity will go nowhere fast. Search engines prefer sites that are well maintained, so you’ll want to investigate these status codes and get these fixed as soon as you encounter them.
A 500 error can also result from an invalid response from an upstream server.
HTTP Status Code 503 - Service Unavailable
Another variety of the 500, a 503 response means that the server is unavailable. Everyone (human or otherwise) is asked to come back later. This could be due to temporarily overloading the server or maintenance of the server. A 503 status code ensures that the search engines know to come back soon because the page or site is only going to be down for a short time. Additionally, a 503 error can occur when clients need to authenticate to gain network access.
Troubleshooting with HTTP Status Codes
HTTP status codes can be invaluable tools for troubleshooting issues with a website or web application. By analyzing the status code returned by the server, you can identify the cause of the problem and take corrective action.
- Check the status code: The first step in troubleshooting is to check the status code returned by the server. This will give you an idea of what went wrong and where to start looking for the problem.
- Check the request method: Ensure that the request method used is correct for the resource being requested. For example, a GET request should be used to retrieve data, while a POST request should be used to submit data.
- Check the request header fields: Verify that the request header fields are correct and properly formatted. Incorrect headers can lead to issues with the request.
- Check the requested resource: Make sure that the requested resource exists and is properly configured. A missing or misconfigured resource can result in errors.
- Check for invalid responses: Ensure that the server is not returning an invalid response. An invalid response can indicate issues with the server or the resource.
- Check for gain network access: Verify that the client has the necessary permissions to access the network. Lack of network access can prevent the request from being fulfilled.
- Check for server configuration: Ensure that the server is properly configured and functioning correctly. Misconfigurations can lead to various errors.
- Check for request formatting: Make sure that the request was properly formatted and sent to the server. Incorrectly formatted requests can result in errors.
- Check the expect request header field: Verify that the expect request header field is properly formatted and sent to the server. This field can affect how the server processes the request.
- Check the status code: Ensure that the status code indicates the correct error or condition. Misinterpreting the status code can lead to incorrect troubleshooting steps.
- Check the error code: Verify that the error code is correct and properly formatted. Incorrect error codes can lead to confusion and misdiagnosis.
- Check the response code: Ensure that the response code is correct and properly formatted. Incorrect response codes can indicate issues with the server or the resource.
- Check the origin server: Verify that the origin server is properly configured and functioning correctly. Issues with the origin server can lead to various errors.
- Check the HTTP status codes: Ensure that the HTTP status codes are properly formatted and sent to the client. Incorrect status codes can lead to confusion and misdiagnosis.
- Check future requests: Make sure that future requests are properly formatted and sent to the server. Incorrectly formatted future requests can result in errors.
- Check the user agent: Verify that the user agent is properly configured and functioning correctly. Issues with the user agent can affect how requests are processed.
- Check the final response: Ensure that the final response is properly formatted and sent to the client. Incorrect final responses can lead to confusion and misdiagnosis.
- Check for generic error messages: Verify that the generic error message is properly formatted and sent to the client. Incorrect error messages can lead to confusion and misdiagnosis.
- Check for too many requests: Ensure that the client is not sending too many requests to the server. Excessive requests can lead to rate limiting and errors.
- Check network access: Verify that the client has the necessary permissions to access the network. Lack of network access can prevent the request from being fulfilled.
- Check redirected requests: Ensure that the redirected request is properly formatted and sent to the server. Incorrectly formatted redirected requests can result in errors.
- Check post requests: Verify that the post request is properly formatted and sent to the server. Incorrectly formatted post requests can result in errors.
By following these troubleshooting steps, you can effectively diagnose and resolve issues with your website or web application, ensuring a smooth and seamless user experience.
Keep Learning
- Redirection
- Canonicalization
- The Beginner's Guide to SEO
- Are 404 Pages Always Bad for SEO?
- How Should You Handle Expired Content?
Try It
- MozBar — The MozBar SEO toolbar lets you see relevant metrics in your browser as you surf the web.
- Link Explorer — Your All-In-One Link Building Tool. Quickly find link building opportunities, track discovered and lost links over time, and create link tracking lists to see when you've gotten a link. Powerful link data to fuel smarter link building.
Put your skills to work
Gauge a Site's Influence with Link Explorer
Link Explorer is a link popularity and backlink analysis tool that lets you research and compare any site on the web.
Additional Articles on On-Site SEO
What Are On-Page SEO Factors?Title Tag
What Are Meta Descriptions and How to Write Them
Show More