HTTP Status Code

Definition

What is an HTTP status code?

Simply put, an HTTP status code is a response sent by a server to a client’s request. It lets the client know whether or not the request was successfully fulfilled and what the issue was in case it was not.

If you want a more in-depth understanding of this topic, check out the FAQ section below:

Question #1: What are the types of HTTP status codes?

The first digit of a status code signifies the type of status code it is. The two preceding numbers pertain to more issues or statuses.  

There are five kinds of HTTP status codes you need to know:

  • Information Status Codes: 101 – 102

These status codes let you know that the browser is processing requests on behalf of the client. 

  • Success Status Codes: 200 – 226

Status codes between 200 and 226 let you know that the interaction between the browser and server was successful.

  • Redirection Status Codes: 300 – 308

Redirection status codes simply mean that you will be redirected to a new or different resource or location. These status codes do not spell trouble, but they do need some type of action on your end before the process can continue.

  • Client Error Status Codes: 400 – 499

The 400 codes are one of two types of HTTP status codes that indicate an error. This puts a complete halt to your web browsing, making the transaction between your browser and the server unable to proceed.

If 400 codes pop up, it may mean that the page you want to go to is either nonexistent or invalid. 

  • Server Error Status Codes: 500 – 599

500 codes result from an error on the side of the server. Even if the request from the client or browser is legitimate and correct, the server is unable to carry it out. 

Question #2: What do I do when I see these codes?

There is no action needed on your end with HTTP status codes between 100 and 200. These just let you know what is happening between your browser and server as you surf the web. 300 codes, on the other hand, simply mean that you may be rerouted or redirected from the original location or resource. This is no cause for worry as well.

In contrast, if you are a site owner and you encounter 400 and 500 codes, there is an issue that may require further action on your part.

If you run into 404 HTTP status codes, for example, consider rerouting via a 301 code to direct the user to the next most relevant page or piece of content. For example, if the user intended to open a page on ‘the best PC monitors 2021’, you could reroute them to a page that lists all your 2021 articles related to PC monitors. 

However, this is just the first step. Simply redirecting your visitors to a different page may leave them confused or, worse, frustrated. Some may even think that you are trying to pull a bait-and-switch on them. So, make sure that you tell them exactly what happened and what they should expect via a clear and concise error message.

Question #3: What are the most common examples of HTTP status codes?

Here are some of the more common HTTP Status Codes you might encounter:

  1. HTTP Status Code 404 Not Found:​​ This may happen when your browser tries to reach a page that no longer exists on the server. 
  2. HTTP Status Code 200 Success: This signifies that the best case has happened and the communication between the client and the server has gone smoothly.
  3. HTTP Status Code 301 Permanent Redirect: This code means that the user will be rerouted to a different site.
  4. HTTP Status Code 403 Forbidden Error: When the website the user is trying to open returns a 403 status code, it means that the server knows what page they are trying to access but they do not have the permission to do so. 
  5. HTTP Status Code 500: This status code means that there was an internal server error.

For more information on HTTP Status Codes, check this article from Umbraco.