Common HTTP errors and how to troubleshoot them

In this HostPapa Support article, we’ll show you how to troubleshoot common HTTP errors. 

100, 200, 300 Series codes

HTTP status codes ranging from 100 to 199 are informational codes. If a browser attempts to access a website and these codes are returned, they usually are not displayed onscreen. They are simply internal codes for the browser’s reference.

Status codes ranging from 200 to 299 are success codes. These codes are used internally by the browser to confirm the success and the current status of a request. Although these codes are generally not displayed, troubleshooting tools can read them, which can be invaluable in the diagnostic process.

Status codes in the 300 to 399 range are redirection codes. They tell the Web browser that some other action must be performed to fulfill the request. Depending on the nature of this action, it may be performed automatically or may require additional user input. For example, status code 301 indicates that a particular webpage has been permanently moved and that all future calls to the resource should be directed to a different URL.

400 Series codes

Status codes in the 400 range are considered to be client error codes. These kinds of error codes are often security-related. 400 level error codes can also be returned if the request is malformed or the client times out.

400 Bad Request

The 400 status code, or Bad Request error, means the HTTP request sent to the server has invalid syntax.

Here are a few examples of when a 400 Bad Request error might occur:

  • The user’s cookie that is associated with the site is corrupt. Clearing the browser’s cache and cookies could solve this issue
  • Malformed request due to a faulty browser
  • Malformed request due to human error when manually forming HTTP requests

401 Unauthorized

The 401 status code, or an Unauthorized error, means that the user trying to access the resource has not been authenticated or has not been authenticated correctly. This means that the user must provide credentials to be able to view the protected resource.

To fix a 401 error, try turning off password protection in cPanel or use the correct username and password.

403 Forbidden

The 403 status code, or a Forbidden error, means that the user made a valid request, but the server refuses to serve the request due to a lack of permission to access the requested resource. 403 errors commonly occur when the user running the webserver process does not have sufficient permissions to read the file that is being accessed.

By default, HostPapa’s servers display this error instead of a website’s file structure if the browser cannot find the website’s home page.

Index Page Missing:

  • The website may be missing the index page, or it wasn’t uploaded to the correct location.

Index Page Misspelled:

  • The website may have the correct index page, but the file itself may be misspelled. For example, the word must be lowercase (with a lowercase “i”)

Redirect with no Index Page:

  • There may be a redirect setup that is stopping the index page from being found correctly. If you have set up any redirects via javascript, cPanel or directly with the .htaccess file, remove and try loading the website again.

Lack of permission to access the requested resource:

  • When the user running the web server process does not have sufficient permissions to read the file that is being accessed.

404 Not Found

The 404 status code, or a Not Found error, means that the user can communicate with the server but cannot locate the requested file or resource.

404 errors can occur in a large variety of situations. If the user is unexpectedly receiving a 404 Not Found error, here are some questions to ask while troubleshooting:

  • Does the link that directed the user to your server resource have a typo in it?
  • Did the user type in the wrong URL?
  • Does the file exist in the correct location on the server? Was the resource moved or deleted on the server?
  • Does the server configuration have the correct document root location?
  • Does the user who owns the web server worker process have privileges to traverse to the requested file’s directory? (Hint: directories require read and execute permissions to be accessed)
  • Is the resource being accessed a symbolic link? If so, ensure the web server is configured to follow symbolic links.

406 Not Acceptable

Web browsers request information from the server. When this happens, it sends an Accept header. This tells the server in what formats the browser can accept the data. If the server cannot send data in a format requested in the Accept header, the server sends the 406 Not Acceptable error. The cause of the 406 error is usually due to a mod_security rule on the server. Mod_security is a security module in the Apache web server that is enabled by default on all hosting accounts.

If you are running into 406 errors and would like Mod_secutiry disabled on your account, open a support ticket via the HostPapa Dashboard and inform our support team. Note: when you create a ticket regarding a 406 error, you MUST include information on how our tech support team can reproduce the error as well as your IP address. (To find out your IP address easily, visit https://whatismyipaddress.com)

500 Series codes

The 500 status code, or Internal Server Error, means that the server cannot process the request for an unknown reason. The most common cause for this error is server misconfiguration (e.g. a malformed .htaccess file). However, the error can also be caused by permissions issues and memory usage limits caused by content management systems such as WordPress and Joomla.

If you are running into 500 errors, try checking the folders and files permissions, and/or rename the .htaccess file and check the cPanel error log. If these options don’t solve your issue, please submit a support ticket.

502 Bad Gateway

The 502 status code, or Bad Gateway error, means that the server is a gateway or proxy server, and it is not receiving a valid response from the backend servers that should fulfill the request. If the server in question is a reverse proxy server, such as a load balancer, here are a few things to check:

  • The backend servers (where the HTTP requests are being forwarded to) are healthy
  • The reverse proxy is configured correctly, with the proper backends specified
  • The network connection between the backend servers and the reverse proxy server is healthy. If the servers can communicate on other ports, make sure that the firewall is allowing the traffic between them
  • If your web application is configured to listen on a socket, ensure that the socket exists in the correct location and that it has the proper permissions

503 Service Unavailable

The 503 status code, or Service Unavailable error, means the server is overloaded or under maintenance. This error implies that the service should become available at some point. If the server is not under maintenance, this can indicate that the server does not have enough CPU or memory resources to handle all incoming requests or that the web server needs to be configured to allow more users, threads, or processes.

504 Gateway Timeout

The 504 status code, or Gateway Timeout error, means that the server is a gateway or proxy server, and it is not receiving a response from the backend servers within the allowed time period. This typically occurs in the following situations:

  • The network connection between the servers is poor
  • The backend server that is fulfilling the request is too slow due to poor performance
  • The gateway or proxy server’s timeout duration is too short

508 Resource Limit Reached

A 508 Resource error results from your site using more than its share of server resources. On a shared hosting platform, many domains/websites share the resources of one server. If this is a consistent problem, you could consider upgrading to a VPS hosting plan, which would give you a more significant share of resources. 

If your website is running on WordPress or another content management system like Joomla!,  the CMS may be using too many plug-ins or modules or is using a specific plug-in or module that is employing a lot of resources.  For example:

  • Some WordPress gallery plugins use enough resources to cause problems.
  • Some older WordPress templates incorrectly use a script called timthumb (this script generates thumbnail images on the fly).
  • WordPress Multisite will cause problems.  It is not recommended for use on shared hosting services.

If you need help with your HostPapa account, please open a support ticket from your dashboard.

Related Articles

Get online with our affordable web hosting

Get online with our affordable web hosting

Learn more now
HostPapa Mustache