1. Home
  2. How To
  3. How to troubleshoot common http error codes

How to troubleshoot common http error codes

In this article, we are going to discuss some of the common causes for your website to turn unavailable. There can be ‘N’ number of reasons and to start the first thing to note is the error codes or the responses the browser present you. 

These can be the response codes the web server returns you for access attempts to the websites hosted in it or the error codes if it is unable to contact the web server. Below noted are few error codes the web server returns for related reasons.

Bad request 400 

The 400 Bad Request Error is an HTTP response status code that indicates that the server was unable to process the request sent by the client due to invalid syntax. Your client/browser may be trying to send a file that’s too big, the request could be malformed in some way, the request HTTP headers could be invalid, and so forth. However we cannot rule out the possibility for a server-side error as the error response simply means that the server is unable to process or refusing to process the request send by the client. 

Unauthorized 401 

The web server is not supposed to serve the HTTP request sent by the client, this can be from the specific configurations enabled in the server or from errors with it. The web servers can be configured to serve the hosted sites or parts of it based on the request location, requested device types etc.

Forbidden 403 

This response code will be served if the request is to something forbidden (specific configuration files, .htacces files etc) or this can also happen from permission errors with the hosted files which will then be unmanageable by the web servers.

Not found 404 

The requested resource is unavailable in the server, this can be specific files, broken URLs etc. 

We’ve written a detailed blog post about how to debug 400 error codes here . 

Internal Error 500 

The server encountered a condition which makes it unable to serve the requested resources. This error code means there is something wrong with the hosted server in which the web server/related applications are running without its software requirements satisfied. This can happen with memory, disk, I/O outages.

Bad Gateway 502 

This can happen when the backend application servers are not available. For example, if the front end web servers are unable to contact the upstream servers hosted in the same server or another remote server.

Service Unavailable 503 

This can happen from any temporary errors like a connection timeout to a requested resource, a failure with the application pools in case of IIS etc. This basically means the web server is up however it is unable to deliver the requested resources as the services supposed to deliver those resources via the web server are unavailable.

We’ve written a detailed blog post about how to debug 500 error codes here.

Gateway Timeout 

This can happen when the frontend web server is not getting a response from the upstream servers within the configured timeout period. This can be solved by increasing the timeout periods for the web servers for respective upstream services.

Too many redirects 

This can happen when the web server is configured such a way that the redirects implemented results in a bottleneck situation, like a redirect loop for the requested resource. Verify the redirects implemented in the .htaccess files, remove duplicates and combine all valid redirects.

Updated on June 6, 2019

Was this article helpful?

Related Articles