Every day millions of people use the internet for all sorts of things. As a rule, we enter an internet address or URL and receive our website. Sometimes, however, it comes to a mistake. The web page will not be displayed and a status code will be displayed indicating the error. However, many users are unaware of the importance of these codes, even though they say a lot about what happened.
What exactly are HTTP status codes?
An HTTP status code is a code that is output from a Web server to the Web browser to convey certain information. The codes are mainly used to tell the browser how to deal with a request or to give a response to a request. The ordinary user will usually notice this status code whenever something does not work. One of the most well-known status codes, the Error 404 page is not found. However, the status code is not only output when errors occur. Even if an operation was successful, a user is redirected, or if a variety of other actions and actions are taken on the server, they are sent to the browser as part of status codes. In most cases, however, you will not notice anything as an ordinary user.
The status code groups
All HTTP status codes are subdivided into a total of six groups, numbered from one to six and nine, each referring to a specific category of messages. In general, the groups are assigned as follows:
* 1xx outputs general information
* 2xx contains the codes for successful operations
* 3xx contains the codes for redirections and redirects
* 4xx is responsible for the client errors
* 5xx is responsible for server errors
* 9xx issues proprietary errors
In these six groups all status codes for the HTTP protocol are summarized. Each group contains a different number of codes that indicate a specific situation, condition, or status.
The 1xx Group - General Information
This group comprises three states, namely the status code 100, 101 and 102. These codes are responsible for the publication of general information and instructions. For example, the 100 code returns a Continue command to the browser informing it that it can proceed with a potentially large and server-heavy request. The 101 code, on the other hand, informs the browser that the protocol is being changed, eg when changing from HTTP to FTP, etc. Finally, the 102 stands for Processing and informs the browser that the request is still actively being processed. This prevents a timeout. The codes in this category are for communication with the browser only, so you will normally not notice them.
The 2xx Group - Successful Operations
These codes are pure informational releases. The statuses in this category provide simple feedback, such as OK, that a form has been submitted to, or that a page deliberately does not contain any content. In most cases, as a normal user, you will not notice or need these codes.
The 3xx group - redirects
The group of 300er codes deals exclusively with diversions. They contain feedback about permanent redirection, proxy usage, etc. They are mainly used to alert the browser to these redirections and to indicate the correct URL or the correct path. As a user you usually get nothing or only very little from the status codes of this group.
The group 4xx - client error
The 400er group is the first group to deal with current error messages. In this case, these are client errors, that is, problems that have been caused by the client, that is, the web browser, or by errors that have been triggered by the client. The number of different error codes is considerable, but the ordinary user typically encounters three codes from this group, namely 400, 403, and 404.
The Error 400 - Bad Request represents a faulty request. Here the browser requested a function or a page. However, the request was incorrectly constructed and therefore could not be executed by the server. You will also get to see the Error 403 - Not Allowed. This error occurs whenever you go to a web page for which you have no access. If, for example, you would like to access a server directory without having the appropriate rights, or if you enter the wrong access data for a .htaccess query, you will receive this error message. By far the most common error is the Error 404 - Not Found. Whenever you enter an invalid or incorrect web page, an Error 404 is the answer.
The 5xx group - server error
If the 400er group is for client errors, ie for errors caused by the web browser, the 500er group stands for the opposite. It returns error messages that were raised by the server or caused on the server. Probably the most well-known error is the Error 500 - Internal Server Error. This is a collection error message for a number of server errors that do not have their own code and are unspecified. Other common server errors include the Error 502 Bad Gateway, such as when a bad proxy is used or forwarding fails, and the Error 503 Service Unavailable when a server is temporarily unavailable due to maintenance, for example. Occasionally, you will also encounter an Error 504 Gateway Timeout telling you that the connection has been lost due to a timeout. Especially on major websites or special offers, you will also find the Error 509 - Bandwidth Limit Exceeded more often. The message indicates that the request was aborted because otherwise the bandwidth the server would have been exceeded.
The 9xx Group - Proprietary Status Messages
The 900er group is completely reserved for own, so-called proprietary error messages. It is intended to serve server administrators and webmasters to develop and use their own error messages and congestion codes. For this reason, the use of states may vary from server to server and from configuration to configuration. An explanation of the codes or a statement about which codes are used can therefore also not be made.