HTTP status codes

HTTP status codes are the response sent by the server in response to the request sent by a client’s web browser under hypertext transfer protocol. 

Status codes are three-digit codes that signify what the server is responding to the browser’s request. 

Having some knowledge of status codes and their utilization aids us in diagnosing page errors and optimizing page speed. 

For example, the 404 error on loading any page on the browser means the server could not find the requested page. 

Types of HTTP Status Codes

These status codes start with digits from 1xx to 5xx, and the first digit of the status code determines its type. 

So basically, there are five different categories of HTTP status code responses, which are:

#1. Informational response [1xx]

The server acknowledges that it has obtained the request on every browser request and is well-understood. 

This server response to the browser is an informational response that takes place during the server processing. 

100,101,102,103 are informational status codes. A client must always be ready to accept an informational response before any regular response. 

Here are some functions of 1xx codes. 

100 Continue – The HTTP 100 status code indicates that the server has received the request and everything is OKOK and also asks the client to proceed with a further request or ignore if the request has been completed.

101 Switching Protocols: HTTP 101 switching protocols indicate the client has requested some change in protocol and the server is changing to the requested protocol. An UPGRADE response header is included to identify the protocol server has switched. 102 Processing: The HTTP 102 code is an indication that the server is processing the request and the response is not yet ready. 

103 Early Hints: The HTTP 103 code specifies that the server is sending a response header before the final HTTP message. 

#2. Successful response [2xx]

Successful response means the server accepts the client’s request for response. These responses start with digit 2. 

The successful response is listed below : 

200 OK: It is a response for successful HTTP requests which depend on the request method (GET, POST) used. 

There are four methods, which are : 

● GET: This method is used to receive data from the server using the parameters in the URL. 

● POST: It sends data to the server like when we submit any form on the web. ● HEAD: It is also used to retrieve information, but it only transforms the header and status line. 

● TRACE: It is used to perform a message loop-back test. 

201 Created– It defines that browser request is successful and a new resource is created. These new resources can be seen on the URI(s) of the response from servers. 

202 Accepted – The request is accepted for processing, but processing is not yet completed. Sometimes, the server accepts the process but does not execute it consecutively and might reject the request at the request run time. 

203 Non-Authoritative Information: It is a response when the server replies with 200 OK, but the original response is altered when displayed. The altered response might come from a third-party entity. 

204 No Content – It occurs when the server completes the processing, but the result/content is not returned. When the server wants to return updated metainformation in the form of an entity header, the 204 messages are displayed.

205 Reset Content – It occurs when the server completes its processing and asks the client to reset/refresh the resource. The client might need to provide additional input, such as username, email, etc., as a part of the login procedure. 

206 Partial Content: Sometimes, the result is delivered partially to the browser, indicated as partial content. 

207 Multi-Status: It provides status for multiple processes in the response header. 

208 Already Reported– The 208 status response avoids the possibility of processing and repeating the same response. 

226 IM used– It indicates the server has completed the request, and the response results from one or multiple instance manipulations applied to the current instance. 

#3. Redirection messages [3xx] 

Redirection messages refer to the redirected location by the server for processing browser requests. 

This class of status codes ensures that further action needs to be taken by the user agent to fulfill the request. 

300 Multiple Choices: This status code points that a resource has moved and can redirect to multiple locations. The browser decides which location /resource to use. 

301 Moved Permanently – It occurs when the URL of the current resource is changed permanently, and a new URL is given in response. If the 301 status code is obtained in response to a request, we must check the request method in the URL. The client should not automatically redirect the request unless the browser can confirm it since this might change the conditions under which users issued the request. 

302 Found (Previously “Moved temporarily”) – It occurs when the URL of the current resource is changed temporarily, and users can use the same URL in the future. 

303 See Other– It indicates that the response to the client request is redirected to a new URI using a GET method. 

304 Not Modified – It indicates the available resource is the latest version of that particular resource. 

305 Use Proxy – The requested resource needs the proxy to be accessed. 306 Switch Proxy – Subsequent requests use a single specific proxy to respond.

307 Temporary Redirect – The server redirects the browser to another URI with the prior request method. 

308 Permanent Redirect: The resultant response is located permanently in a new URI.

#4. Client error messages [4xx]

These status codes generate messages indicating that the client has caused an error in sending a request to the server. 

A few commonly seen client error messages are : 

400 Bad Request – The server cannot proceed with the browser request due to invalid client requests or errors. 

401 unauthorized – The server requires the client to be authentic, and when client authentication is not confirmed, HTTP 401 status code is sent as a response. 

403 Forbidden: Whenever the client request is valid, but some additional credential or resource is to be provided to the server but is not yet provided, the server refuses to process; in such case, a 403 error is displayed in the browser. 

404 not found – 404 error is the most widely known, indicating that the requested page or resource is unavailable on the server. 

405 Method Not Allowed – when the request method (e.g., GET, POST) is not supported, 405 error occurs. 

406 Not Acceptable – When the server sends a response to a client request, but the response’s content is not request-driven. 

407 Proxy Authentication Required indicates that the client needs to authenticate itself via proxy. 

408 Request Timeout: When the server is waiting for a valid request for a defined specific time and that time has finished, 408 error occurs. 

414 Request-URL Too Long – When the requested URL for the resource is too long than the length specified by the server, the server responds with a 414 error. 

423 Locked: When the requested source has been locked, we see 423 errors.

451 Unavailable For Legal Reasons – When an unauthorized client has requested a resource requiring legal permissions, a 451 error is displayed, meaning the requested page is unavailable for legal reasons. 

#5. Server error messages [5xx] 

The server error message indicates the server is unable to execute client requests. These error messages have a status code starting with digit 5. 

A few commonly viewed 5xx errors are : 

500 Internal Server Error – It is the condition when a server faces some internal errors. 

501 Not Implemented – It indicates that the server cannot recognize the request method. 

502 Bad Gateway: When a server acts as a gateway itself and receives an error from the upstream server that the gateway is not proper, in such case, 502 error is received. 

503 Service Unavailable: The server cannot fulfill client requests. 

505 HTTP Version Not Supported – The HTTP version in client request and server supported HTTP version don’t match. 

507 Insufficient Storage – 507 error means the server has no more space for processing client requests. 

511 Network Authentication Required – Browsers need to authenticate themselves to have network access. 

Besides these mostly encountered HTTP status codes, many more codes have different meanings. 

Some unofficial codes like 419, 420, 509,529, etc., are also seen. These status codes convey information on what is happening between browser and server. 

We have some insights into the classes and types of status codes we may receive on our site. 

How to use HTTP status codes to troubleshoot website issues and common errors

Now let’s go through how to handle these errors and smoothen out site activities. 

Generally, the client and server errors need to be identified and resolved to make our site work well. 

The use of status codes can do error identification and handling. 

First, it is necessary to understand whether the error is a client or server error. The simplest and most effective way of differentiating them is : 

● If a client error occurs on a website, the server sends an HTTP status code starting with digit 4 (400-499) 

● Similarly, the status code begins with 5 (500-599) if a server error occurs. Then whenever we make any change in server request, we should refresh the browser. 

To understand the errors, we check from server logs, which provide a detailed description of errors thus occurred. 

Since we have a general knowledge of HTTP codes, we can solve the frequent website errors independently. 

Few troubleshooting ideas are mentioned below : 

400 Bad request – When the request sent to the server has some error, we can check the syntax for resource request and reask the server to fulfill the client request. 

401 Unauthorized: We need to be authorized users to access the requested resource. We should provide the credentials requested by the server to access the protected document. 

403 Forbidden: When a client sends a valid request, the server hesitates to fulfill it because the 403 code is seen. It may occur due to denial of file permission, .htaccess file, or no index file found. 

404 Not found – 404 error occurs when the server does not have a requested file or the file has been altered or deleted. It may occur either due to typological errors or invalid URLs. One needs to check all of these possibilities to troubleshoot 404 errors. 

500 Internal Server Error: To resolve 500 errors, we need to check whether the installed packages for a particular resource are machine version compatible and executable or not. Server configuration must be done wisely.

502 Bad gateway: For 502 errors, we need to understand if upstream servers are working properly or not, and we need to ensure the connection between our proxy server and the upstream server is good. 

Few general steps for troubleshooting : 

  • Could you refresh the page by reloading it? 
  • Restart your networking devices. 
  • Make sure that the proxy server in your browser is correct. 
  • If other devices face the same problem, try clearing your DNS cache. 5. After performing the above actions, if your problem is not yet solved, contact the web administrator or your ISP. 

Tools and resources for understanding HTTP status codes 

Some SEO applications are designed to gain broader insights into these status codes. These applications make an easy understanding of status codes. 

Screaming frog SEO spider is a site audit tool that you can use to learn about HTTP status codes. It supports two different methods for learning and troubleshooting these codes, namely, by GUI method and the bulk export method. 

You can also use free tools like Google search console to understand the HTTP status codes. 

One needs to crawl through the browser and check for response codes, and there we can filter errors by their respective categories such as client error, server error, success error, etc. 

Final thoughts

It seems a lot when you go through all the HTTP status codes. 

They are necessary to learn as they impact the performance of the website. 

It plays a huge role in search engine optimization to organize and manage your website’s status to attract many users. 

You may have to encounter a lot of status codes while working on your website.

It would be best if you troubleshoot them as soon as possible. 

Growfore Solution is one of the SEO agencies whom you can completely entrust with the HTTP status codes troubleshooting and maintaining your website excellently. 

You can always contact us for any HTTP status code situations.

Leave a Comment