Http protocol: the codes and their meaningHttp codes, also known as status codes, are a response to a request made on a browser by an Internet user. These codes provide information on the status of a URL, for example, of a website or request. You are bound to know the error message 404. This is, indeed, a http code.
They are classified into five categories: each one indicates a different type of status and impacts, in one way or another, your platform’s referencing, as well as visitor behaviour. Understanding them will enable you to improve the maintenance and management of your site.
How does http protocol work?
To access any website or webpage you must have its URL, that is, its address. This is entered into the browser's search bar, which then sends a signal to the server hosting the platform.
This signal, composed of various pieces of information, and the server's response are transmitted using the http protocol. The latter is then able to indicate the site’s status, as well as the processing of the request issued by the browser.
For example, if a problem occurs when connecting to the site or a particular page, an http code will be displayed to the user. On the other hand, if the operation is completed successfully, no message will be displayed to the Internet user.
We mentioned the 404 code above: it informs the Internet user, via an automatically generated dedicated page, of the impossibility of accessing a particular URL. This is why the http code is also called the status code.
The different codes and their meaning
The meaning of the various http codes is actually based on the status of a website or page. In addition, there are 5 different categories, for 5 status types.
The 100 codes
100 codes inform the client (i.e. the browser and, therefore, the Internet user) that the request is currently being processed. In this case, no message will be displayed on the browser.
The 200 codes
This category indicates to the client that his/her request has been successful. In addition, navigation can be undertaken without any problem. In this case, the Internet user is then not able to see the http code, since he/she only has access to the content of the URL that is of interest. The 200 OK code therefore tells the browser that the information has been processed correctly by the server.
The 300 codes
In this case, the request has been taken into account by the server but cannot be completed without the client taking action. Furthermore, an additional procedure must be initiated in order to benefit from the page’s content. These http codes are mainly used for redirections.
- Code 301: in this case, the browser must redirect the user to another page. The webmaster has created a redirection in order to send the visitor from one web page to another. However, this does not mean that the content will be identical. The Internet user will not see a redirection message, simply the destination page. This relates to a permanent change of address. Also, code 301 can be used when a website has changed its domain name, for example.
- Code 302: where the code mentioned above concerns permanent address changes, this one is used for temporary changes. Also, the old URL will still be valid, but will not be available for the moment, until the webmaster removes the redirection. Once again, the Internet user will not see this message. He/she will automatically be taken to the relevant redirection page thanks to his/her browser.
The 400 codes
These http codes relate to an error on the client’s part. The request has been properly received, however, it cannot be processed. You are most likely familiar with code 404, which is generated when the requested URL has not been written out correctly. We will also see that another interpretation is possible.
- The 403 forbidden code: here, the client is not able to access the URL of his/her choice, because his/her access requires authentication, that is, an authorisation set up by the webmaster.
- The 404 not found code: while it is possible that the URL has been written out incorrectly, error 404 can also relate to dead or broken links. The address requested no longer exists. In this case, the visitor will be directed to a 404 error page which is automatically generated or customised by the webmaster. The latter is then able to offer the Internet user a solution, for example, a return to the site’s home page, or to access content similar to that which no longer exists.
The 500 codes
In this case, it is the server that is failing. The latter has not been able to process the request sent by the client.
- The 500 internal server error code: this error, which is unexpected, indicates that the problem is internal. The administrator must take note of this and carry out the appropriate maintenance work.
- The 503 service unavailable code: this message appears when a server is no longer able to respond to the client request. This can be the case if a site receives too many visits and does not have the capacity to handle all of them. However, this is a malfunction that can be addressed very quickly by the administrator.
Impact and management of http codes on a website
Of course, the appearance of an http code will have more or less serious repercussions on both the behaviour of Internet users and also on that of search engines.
Thus, any webmaster must keep a constant watch, in order to detect dead links, for example, or server weaknesses and avoid error messages.
The impact on visitors
A 404 http code is particularly frustrating for Internet users, who will tend to abandon the site in question and no longer trust it. It is then possible that the site may experience a significant drop in traffic (a highly important criterion for your referencing).
This is particularly serious for e-commerce sites, as well as for online service providers, whose activity is based exclusively on their Internet platform. As we have mentioned, monitoring and maintenance work is absolutely essential in order to offer a functional site.
The impact on search engines
To detect these http codes, search engines use indexing robots which are capable of analysing the various pages of a site. Also, the more error messages and http codes multiply on a platform, the more search engines interpret them as a lack of maintenance. Your ranking in the search pages may therefore drop.
How can I best manage http codes?
While not all http codes can be dealt with, others are fairly easy to manage. This is the case, for example, with code 404. Tools such as Google Search Console can help you identify broken links and, if they originate from your own site and not from an external page, it is quite possible to establish a 301 redirection to another page.
Nevertheless, check that the content of this new page is relevant and similar to the one that no longer exists. This way, you can be sure to be able to respond to your visitors' requests. This will enable you to maintain your position in search engines as well. The other solution is to direct the user to your site’s home page.
Of course, highlighting dead links and eradicating http 404 codes is a long-term task. Moreover, it is not always possible to prevent this type of message from appearing. Also, in certain cases, it is better to concentrate on the error page.
Managing http codes with a creative error page
We have previously mentioned the frustration and disappointment generated by the appearance of a 404 error message, so it is highly recommended that you customise this page in order to regain Internet users’ trust.
Through doing so with humour, but also by adopting a design that is consistent with that of your website, you can encourage the visitor to go to your home page, for example, to discover the structure of your site, or simply inform him/her of the nature of the problem. Your CMS plugins allow you to do this, so don't miss out!