People occasionally encounter different types of website or HTTP errors over the internet when they try to access a website. A HTTP Error conveys to the user that something has gone wrong. Sometimes they happen due to problems on the user’s end (client side) and on some occasions, the server side is responsible. Getting them can be really annoying and thus having understanding about them is important.
The most common among these HTTP Error types are explained below which lie in the 4xx and 5xx categories.
4xx: Client-side Website HTTP Error
4xx errors occur on the client’s side (the computer trying to access the website/service). These errors occur when there the user’s computer is unable to access the required webpage due to any reason. This can be due to any inconsistency between the availability of the web content and the user’s request.
The most common types of 4xx Errors are defined below:
400 – Bad Request
This error occurs when the request sent by the client cannot be processed by the server. This means that the request was either corrupted or incorrect in a way that it could not be understood by the server.
This can occur if the URL contains characters which are not recognizable. If the URL is correct then the cookies might be checked as expired cookies can cause the 400 error. Another common case of encountering 400 error is when files larger than what a server can handle are uploaded.
401 – Unauthorized
The 401 status code occurs when authentication fails from the client’s side. Websites sometime have password protection which can restrict access of normal users to important areas e.g., the wp-admin panel of a WordPress website. If the user does not have the valid and required authentication credentials to access a resource, he/she will be shown this error code.
403 HTTP Error – Forbidden
This error code is shown if the requested path contains valid data and the request sent by the client is understood by the server, but still the server denies access to the resource. Websites can use it to set an extra layer of security and restrict unauthorized access to important directories and files.
The web crawler of Google Search Console and other webmasters will also face these errors if they try to crawl a noindex page of a website as they would not be allowed to access it. Blocking access to a page using Robots.txt will also have the same effect.
It is advised to regularly check for this status code as if a page hits the 403 error, it will hold no search rank eventually effecting the Search Engine Optimization.
404 HTTP Error - Not Found
The user will encounter the 404 – Not Found Error if it tries to access a webpage which does not exist. This happens because the server cannot find anything at the requested location and thus is unable to return any result.
Normally 404 error occurs if the URL is misspelled. Moreover, removed or shifted webpages can also cause the user to get this status code error. Having 404 errors can be really bad for the SEO as search engines consider it as unprofessional. Furthermore, 404 – Not Found errors can also increase the bounce back rate of a website.
408 – Request Timed Out
This is an HTTP response status code which tells the users that the server was not able to get a proper or complete request during the allocated period of time. In simple words, it means that the server closed the connection as it had to wait too much. When this happens, you would see messages like the following on your screen:
- Request Timed Out
- 408: Request Timeout
- The request has been timed out
- HTTP Error 408 – Request Timeout
This 408 Request Timeout Error is mostly caused due to slow internet connection. For example, a server allots a time of 400ms for a request but due to slow connectivity, the network is facing a latency of 500ms. This would mean server will have to wait way longer than the assigned time period.
Moreover, typing in incorrect URLs can also sometimes lead to 408 error.
Related Read:
5xx: Server-side Website HTTP Error
5xx errors are caused on the server when it is unable to handle the request sent by the client (user’s) side or simply cannot provide the support required to any function requested by the client.
This does not mean that the client’s side has done something wrong as 5xx server side errors occur when an apparently valid request cannot be dealt with.
It is important to know that sometimes a chain or group of servers are used to handle HTTP request. So, the error might not necessarily be caused on you server.
Following are the most commonly encountered 5xx server errors:
500 – Internal Server Error
500 Server Side error is called the Internal Server Error and it happens when the server encounters an unexpected problem during the execution of the request received from the client side. In this scenario, the server might not be able to pinpoint the exact problem occurred. In some cases, this can take place if the application is not correctly configured and connected with its relative server(s).
500 Internal server error can be corrected by deleting or resetting the cookies related to the service or website who is generating this error. In few cases the users might also have to delete the complete browser’s cookies.
A segment of code or a service can also cause it and result for the website to go down. For example, if you are using WordPress, then a single failed plugin can cause the whole service to hit a 500 internal server error.
501 – Not Implemented
The 501 server error is generated when the server is not capable to provide support to the functionality which is needed to complete request sent from the client side. It can happen when any server is unable to recognize the method of request and thus cannot support it.
501 Not Implemented Error can be caused by viruses which prevent browsers to properly communicate with the servers.
Moreover, this server side error can also appear due to server overload. If your website is receiving way too much traffic requests, it is possible that communication might get slowed down and eventually servers might not be able to serve further requests.
502 – Bad Gateway
Sometimes the servers you are connected to need to get information from other upstream servers. In this way they act as a gateway or proxy.
502 server error occurs when these gateway servers (which are connected with) cannot get a valid a valid response from the other upstream servers. Due to which they are unable to complete your request.
The 502 Bad Gateway Error can occur if the two servers are facing network issues and can’t interact properly. Just like that server overload can also cause 502 errors. Furthermore, configuration issues and firewalls can also cause them.
502 errors can be solved sometimes by simply refreshing the page or by clear the cache and cookies. In some cases, visiting the website from a different browser can also solve the issue.
503 – Service Unavailable
Getting the 503 error on a website would mean that the server is currently not prepared to handle the generated request. The server might apparently look fine to the server manager or programmers as the exact cause might not be known at the start when this error happens.
Determining the root problem causing the 503 error can be difficult at times. Going over the server side logs of your website can help you figure out what caused the issue.
Most of the times, this 503 “Service Unavailable” server error is caused when a website is not able to make a suitable connection with its server. This means that the information requested and expected from the website cannot be delivered.
Denial of Service (DDoS) attacks are also a common reason causing 503 errors on websites.
If your website is generating this error, it is advisable to check if is going through maintenance work as that block the direct connection to the server. Also check the firewall configurations and fix any faults there.
504 – Gateway Timeout
504 error is caused if your server is acting as a gateway and requesting a response from some other upstream server, but that response is not delivered in the allotted time period. That is why it is name “Gateway Timeout”.
Just like 502 errors, 504 error can happen due to connectivity issues between the servers. Secondly, when changing servers, the website’s Domain Name Servers (DNS) are also changed which can take some hours to be fully effective. During that time a website might generate 504 server errors.
505 – HTTP Version Not Supported
If the HTTP version used in the generated request is not supported by the server, then a 505 error will be thrown.
This can be due to misconfiguration of server-side programming. Old and outdated browsers are also of the reasons for this error to occur as they might be able to support the HTTP or other protocols needed for the request to be fulfilled.
Upon encountering this error, you should check if your browser supports the modern and required protocols to run your website. The server should also be checked for these protocol supports and upgraded if required.