We can’t send you updates from Justia Onward without your email.
Have you ever tried to visit a website and received a “Page Not Found” message with a 404 code? If you want to learn more about what this code means, as well as other common HTTP Status Codes you may encounter online, this is the article for you!
Each time you interact with a website or application, you are sending a request to its server. The server will then respond with either the information you requested or with an error. This information will include an HTTP (Hypertext Transfer Protocol) Status Code.
Why Are HTTP Status Codes Important?
HTTP Status Codes are an important part of how interacting online works. They are all about communication and are essential for the request-response cycle.
Let’s consider a basic example. When you visit a website, there are two key actors: a client and a web server. The client is your web browser, while the server is the website hosted on a remote/local server.
When you load a webpage, each element on the website will be served by the server as a response to your request. Part of this response will include a status code. You can even visualize it on the network panel of your browser’s developer console.
For example, in the image above you can see an HTTP Status Code (200 OK) for every element loaded on the IANA Protocol Registries page.
The status codes let you know whether there are any issues with a request. The usefulness of status codes may reach even further than you realize. For example, in Google Search Console you may find URLs reported with issues or errors. Google identifies those errors based on the returned status code.
Related Article: Crawling: Googlebot and Your Website
Types of Requests
All requests must be sent using an HTTP method. Using the HTTP method, you designate the action you wish to perform. The methods/actions are also known as HTTP verbs.
The most common HTTP methods are GET and POST:
|GET||Every time you access a website, you are performing a GET method. It retrieves data from the server.|
|POST||The POST method is used to submit an entity to the specified resource. For example, when you submit a form there is usually a POST method in use.|
Other commonly used HTTP methods include CONNECT, DELETE, HEAD, OPTIONS, PUT, TRACE, and PATCH. To learn more about all of the existing HTTP response methods, you can visit this site.
It is a best practice to force your website and server resources to match the expected request. If you receive an HTTP method different than what your application or website is expecting to handle, it must either ignore or reject the request.
HTTP Response Codes
|1xx||Informational Responses||Request received, continuing process.|
|2xx||Success Responses||The action was successfully received, understood, and accepted.|
|3xx||Redirection Messages||Further action must be taken in order to complete the request.|
|4xx||Client Error Responses||The request contains bad syntax or cannot be fulfilled.|
|5xx||Server Error Responses||The server failed to fulfill an apparently valid request.|
Source: HTTP Status Codes
The above defines general categories for HTTP Status Codes. However, each category has several more specific codes within it. In the following table, you can review some of the more common, specific status codes you may encounter.
|200||OK||The request was successfully processed by the server.|
|201||Created||The request was fulfilled and a new resource was created.|
|301||Moved Permanently||The URL has been moved to a different location permanently.|
|302||Found (Temporarily Moved)||The URL has been moved to a different location temporarily.|
|400||Bad Request||The server couldn’t understand the request, usually caused by a bad syntax or a malformed URL.|
|401||Unauthorized||The URL requires authentication, the required credentials are not present or wrong.|
|403||Forbidden||The server refused to respond to the request.|
|404||Not Found||The requested resource is not available on the server, but it may come back in the future.|
|410||Gone||The requested resource is permanently unavailable.|
|500||Internal Server Error||The server had an internal issue fulfilling the request.|
|503||Service Unavailable||The server is currently unavailable.|
|504||Gateway Timeout||The request took longer than the server expected.|
- MDN Web Docs: HTTP Response Status Codes
- MDN Web Docs: HTTP Request Methods
- Internet Assigned Numbers Authority (IANA)
Final Thoughts: Why Do You Care?
Whether you are a developer, an SEO consultant, or the average internet user, it is helpful to understand what the various HTTP Status Codes mean. Having this basic knowledge not only helps improve your understanding of how you interact with information online but also aids you in identifying issues on your website and assigning the proper status codes to your resources. While it is not uncommon to discover 404 pages that return a 200 OK status code, these kinds of issues can affect your SEO strategy and may negatively impact your website rankings.