While surfing the internet, we encounter many errors pages which has a 3 digit HTTP status code sent by the web server e.g. 302 error or 404 error. These error/informational codes provide important information to the users. If you own a website then it is essential for you to get some awareness about them so that you can fix them and enhance the performance of your website.
These codes come in 3 digit numbers and they are categorized depending on their first digit:
- 1XX provides information
- 2XX convey success
- 3XX provides information related to redirection
- 4XX convey client errors
- 5XXs indicate server errors
Today, I want to put some light on some common HTTP status codes
204, No Content
This indicates that the server has processed the command but it is not able to return any content.
301, Moved Permanently
If you have changed your URL or domain then you need a 301 redirect to convey the search engines that you have moved your website from one address to a new one, forever. This will enhance the direct ranking of your new website.
302, Moved Temporarily
Sometimes, we have to shut down our site for some reasons and we do not want to show 404 error or a broken link so we can rather use 302 redirects. It will move our visits to a location. It is commonly known as “temporarily move”.
400, Bad Request
This response comes up as a message from the web server indicating that the request or the data stream sent from the application you are using (e.g. your web browser) was malformed or corrupted on the way as it did not follow the HTTP protocol which it was supposed to follow. So, the web server is unable to understand the request and eventually could not process it. This is also called bad request.
There are various websites and pages that require authentication to access them. 401 indicates that the HTTP request has not been processed because the authentication credentials you used have been refused by the server so please check if the username and password are correct or not.
In the case of 403 status code, the request is valid but the server refuses to process it because the website may have some classified information and for security reasons, it is being protected or hidden from being hacked with the help of code 403. The user may need some sort of authentication or permission to access a 403 coded page.
404, Not Found
This error message is shown when we try to find a web page on a server but it could not access it either because the web page we are looking for doesn’t exist or the URL we typed has some errors. If this error message comes up, we need to ensure the URL we typed is correct.
405, Method Not Mentioned
This error code indicates that the web server knows about the request method but it should not be used because it has been disabled.
500, Internal Server Error
Sometimes the server encounters an error which it does not know how to handle and no specific message is available for it. Then, in such confused situation, the server shows error 500.
502, Bad Gateway
This status code indicates that the server, which works as a gateway, does not receive a valid response from the backend server which actually processes the request.
503, Service Not Available
This code comes up when the server is not available or it is down for maintenance.
504, Gateway Timeout
It is caused when the server you are trying to access could not receive a timely response from the upstream server.