You have been waiting to buy a product for a long time on an e-commerce site and finally one day you hear its back in stock. So you decided to buy it and just when you click on the product page :
"ERROR * page not found!!"
Hello everyone, I am back to writing blogs after a long break. Also this is a shift from the routine of publishing a blog on Fridays. I am thinking of changing the day I publish my blogs, will share more about it in coming blogs.
So without wasting much time let's get into the subject for today. As a web developer or a user we come across many error codes which is frustrating. But these error codes have a significance in improving the user experience as well as the visibility of the website. Each error has a specific status code to help search engines and developers rectify the problem with the code. The error codes sometimes also helps the user understand the reason they are not able to view the page. These codes are returned when a search engine or user requests to view a page on a server. If the server is unable to return the page it will return a three digit code.
The main error codes belong to 400 and 500 series but there is another code which is ERROR 200.
Let' dive into some of the error codes in detail:
ERROR 200- This means 'okay' or 'success' which means the page requested has loaded properly.
ERROR 404- This is a more common error we come across. This code means that the page has not been found. Search Engine recognize these as pages that are no longer available.
But a website should not only display the error message. It should have navigation bar to redirect to the pages of the website which are not down. Doing this prevents the developer from losing an active customer. Also a developer should try and minimize the number of error 404 a website throws. It improves the SEO performance of a website.
An important issue or error to watch out for is 'soft 404'.
Soft 404- This means that page no longer exits but is still returning a status code of 200 that means 'Okay'. So we can see how bad this is for a website. A prominent example of this error can be seen on a e-commerce site where we a see a product but when we click we see that product is no longer available. This type of problem is very bad for SEO, as search engines are now seeing live pages with simply error messages on it. These pages are considered as duplicate page by search engine which harms the rankings of our site. So, this is the error message we should be more careful about when analyzing a website.
ERROR 500 - Next is 'ERROR 500', this is means 'Server Error' and is a temporary error and mainly resolve themselves.
ERROR 503 - This code means service unavailable and should be thrown when the server is down, or a maintenance is being performed or even if traffic is too high. This will let the search engine know that there is a problem but it is temporary so it will revisit it later thus improving SEO of the page. One important note to keep in mind is whenever taking a server down be sure to throw 503 error and not error 500.
This was all about I think a beginner should know about error codes. I hope with this article everyone will have a broader understanding of different error codes shown on a website. I would love to read your views in the comment.
Books I am reading currently -
- Core Java Interview Questions You'll Most Likely Be Asked - A great book for someone looking to prepare for Java Interviews. The book has great questions with code snippets to understand better. Link to the Book