When a user requests for a webpage to visit by clicking on some link or by entering the URL in the browser, the computer will request data from the server through HTTP (Hyper Text Transfer Protocol). Different web pages are stored on different servers. Now before the requested page is sent to the corresponding browser from the server, it sends an HTTP header that has the status code.
The status code provides information about the status of the current request. A normal webpage which is available and ready to be displayed in the browser gets the status code as 200. The user never sees this because the server sends the content of the page immediately after sending the HTTP header. It is only when there is some error that the user is able to see the status code.
Categories of HTTP Status Codes
The HTTP status codes are 3 digit numbers. There are five different categories of these codes and in each category there are different status codes. Here is a brief idea of all these categories:
100s (Informational): Codes under this category indicate that the request is received and its in process.
200s (Success): Codes of this category specify that the request which was received successfully was processed successfully as well.
300s (Redirection): Once the request is received and if an additional step is to be performed to complete the request then the status codes from this category appear.
400s (Client Error): If the user requests for a webpage but the page is not valid then this category of status codes come into effect.
500s (Server Error): If the request made by the user is valid but the server fails to complete the request.
There are numerous status codes which are covered under all these categories. However all are not useful from SEO view point. The HTTP status codes which are useful for SEO are mentioned ahead. The best way to optimize any site with these useful codes is to hire an experienced SEO consultant who can do this work efficiently.
Important HTTP status codes for SEO
200: Indicates everything is alright
The user sends a request to the server and when this request succeeds then the web page is displayed correctly and this status code is generated by server but is not visible to the user.
301: This status code is used when a webpage is Moved Permanently
If a webpage is moved from some URL to another in such a way that if ever the former URL is requested by the user then the request should be redirected to the new URL. It is commonly known as a 301 redirect by the SEO community.
Once a different URL is assigned to a webpage then the request from the user is responded from the redirected URL but continuing to use the original location by server is not recommended. Thus by using 302 code one can assign crawlers to treat the redirect as temporary and not to give the link juice abilities.
404: Requested page Not Found
Whenever a user makes a request and the matching URL doesn’t exist then this code is used. Any time when the server can’t find a matching page request then this should occur showing the user “404 error” which means that the requested page is not found.
410: Requested resource is no longer available
This HTTP status code indicates that the source is no longer available and moreover it won’t be available again. If a webpage or any other resource is removed intentionally from the website then this code is to be used. When this status code is received then the client should not request the resource again the next time. Search engines should remove such resources which has 410 status code from their indices so that the search engine users are not faced with such results.
503: Service Unavailable
There might be case that the server from which webpage is requested is currently not able to handle the request. There might be temporary overloading or the maintenance of the server might be going on. Thus using this code one can inform search engines that the service is temporarily down for a short time.
As mentioned each and every HTTP status code has its own significance. So the appropriate status code should be used so that the server can let the users and crawlers know the current status of the request.