When undertaking technical SEO audits or diagnosing technical issues with a website it is important for an SEO to understand what the most common HTTP status codes are and when they should be used. This article will explain what they are, when and why they occur, and most importantly how to utilise them effectively.
Each time you visit a new page on a website (or a page anywhere across the web), your browser sends a request to that website’s server. The response to the request is a three digit code from the server – this is the HTTP status code. This code acknowledges the request from the client and represents the response from the server.
There are hundreds of different codes, with each code serving a different purpose. These codes let you know if a page is functioning correctly or if there are issues, and if there are, what issue is occurring.
When bots crawl a website it will request web pages in the same way a browser does – the HTTP code directs this exchange.
SEO specialists can implement certain codes across a site to create different journeys for users and bots. That is, to change the path of a user or a bot when crawling a site. Status codes can be used to pass or block link equity flowing through pages also.
As these codes are handled differently by search engines, it is important to use them correctly! If a code is used incorrectly your site could face major technical SEO issues.
This is why search engine optimisation (SEO) specialists need to understand the HTTP protocol and how these affect bots crawling and indexing pages.
SEO specialists also need to understand common status codes, to inform technical SEO strategies and to diagnose issues on a website.
Below, we will break down common HTTP codes, when to use these codes and how these codes should be implemented for best practice SEO.
There are different tools that can be used to check the HTTP status code of a URL, with some being more efficient than others.
To access Chrome’s built in tools, Open Chrome DevTools and access the ‘Network’ tab to see network activity.
Users often find this tool a little clunky and prefer to use a browser plug-in tool when testing URLs (see below).
Redirect Path is a popular browser plug-in by Ayima. This tool allows the full exploration of a HTTP response. The Chrome plug-in can be downloaded here.
An example of the response codes for Ayima’s website – there is a 301 redirect to the HTTPS version of their site.
This is the full HTTP response for our URL using Redirect Path
The URL Inspection feature within Google Search Console allows you to request HTTP responses.
Once you request a URL, open up the ‘Coverage Panel’. Within this, the “Page fetch” defines the HTTP response.
When we request the URL: https://www.semetrical.com/technical-seo/, the tool returns a response of ‘Successful’ which represents the 200 Ok status code.
There are different classes of status code, which SEO’s should know from memory – knowledge of these will lead to finding the cause of an issue more efficiently. They are:
These codes signify that the page was fetched successfully, which to a user, means a page loaded as expected. Normally, 2xx requests are not visible to a user but are processed by bots.
200 – Ok
The 200 code is the most commonly encountered across the internet – it represents the page you clicked on loaded correctly. This is the most common exchange between a browser and a webpage. There is no action needed with 200.
For SEO, 200 codes pass link equity between pages.
When you are redirected from one page to another, a 3xx response will come from the server. Redirects can be temporary or permanent, which is distinguished by different codes.
301 – Permanent Redirect
The 301 status code is a popular code amongst SEOs – it tells browsers that a web page has moved permanently to another page (which means the URL has changed). Both users and bots will be redirected from an old page to a new target page with a 301.
Although there is some speculation, it is widely agreed within the industry that 301 redirects pass valuable link equity from an old page to the newly redirected page – this means ranking power is not lost using a 301 redirect!
For search engines, a 301 signals to remove the old page from their index and associate the old pages metric’s to the new page.
SEO application: You should always use a 301 when you need to permanentlyredirect one page to a new page address. For example, when migrating from HTTP to HTTPS, use a 301 redirect from each HTTP page to its respective HTTPS version.
SEO Tip: Always 301 redirect a page to its final destination! If you do not, you risk creating redirect chains which a bot will have to crawl through to find the intended page – this will reduce the crawlability of your website!
For example, a 301 from Page A > Page B > Page C will cause technical issues.
Its best practice to 301 Page A > Page C.
302 – Temporary Redirect
Like 301s, 302 redirects tell browsers that a page has moved, the crucial difference is that 302s are temporarypage redirects.
While users and bots are sent to the new target page, search engines will keep the original page in their index.
This temporary nature of 302 redirects means that no link equity is passed to the new page – as Google understands that the original page will be activated after a short while.
SEO application: Apply a 302 redirect when you temporarily want to move bots and users from one page to a new target page.
For example, when testing the effectiveness of a new landing page, you would implement a 302 redirect so a landing page moves from Page A > Page B. After the testing period is over, remove the 302.
It’s important to remember that 302 redirects do pass on link equity from one page to another. If a 302 redirect is not removed after a set period of time, the link equity from the original page will be lost and prevented from flowing through a site – damaging a site’s ranking power!
A 307 is the equivalent of a 302 redirect. The difference is that a 307 guarantees the client follows the request to direct both users and bots to a new, temporary page. Older client pages may not adhere to the redirection, which can cause problems.
As a temporary redirect, link equity is not passed from the old URL to the target URL and search engines will keep the old URL in their index.
A 307 redirect can be also be understood as a browser redirect, rather than a server redirect. A 307 is served when a browser redirects from HTTP to HTTPS.
A browser will internally redirect users and bots to the HTTPS version of a site, if a site is on the HSTS Server preload list or if the browser has been requested to do so previously.
To note, websites on the HSTS preload list tell browsers to serve HTTPS.
For example, a user may request to go to http://yourseowebsite.com but the browser will override this using a 307 to https://yourseowebsite.com. This redirect prevents requests to unsecure sites (those using HTTP).
HSTS is supported across browsers, and more information about this can be found here https://hstspreload.org/.
SEO Application: A 307 should be applied to ensure that internal redirects are secure.
When a page can not be accessed a 4xx code is sent by the server – an error message will appear on the webpage. These codes signify why a page can not be assessed from the client side.
404 – Page Not Found
The most common 4xx code is a 404. This is a response from the server that the page requested could not be found. Users will not be able to access the page.
404’s can occur intentionally if a web owner has removed a page on site, but this page is still linked to internally. Or, these can occur accidentally through a bug in the system – these accidental 404’s should be avoided at all costs and highlight the importance of reviewing 404 pages on your site.
Although 404 pages are not currently accessible, they are still within Google’s index. After time, these pages will be removed from the index if a page is repeatedly crawled and returns this error.
Despite this, 404’s should not be viewed as a negative. There are strategic ways to implement these errors to assist with the removal of a page from Google’s index, and there are opportunities to create user-friendly 404 pages, a recommendation from Google!
SEO Application: There are opportunities for SEOs to make 404 pages error pages to 301 redirect (permanently move) to an active URL. For example, valuable pages that had high traffic flowing through and link equity (a category hub page) should 301 redirect to another relevant page on site.
There are also instances where keeping 404 pages becomes strategic – this will aid in page removal from Google’s index as it will not be crawled by search engines. In this scenario, create a custom 404 page where a user can progress to other areas of your site with key internal links. This will prevent the potential negative effect of higher bounce rates when a user faces a 404 page.
410 – Page Gone
A 410 error code is similar to a 404, the difference is a 410 signifies that a page has been removed permanently. 410’s occur when there is the deliberate removal of a page from the site owner – the page will no longer be available from the server.
To both users and bots crawling the page, 410 error pages are a dead end, therefore internal links pointing to these pages should be removed.
For search engines, a 410 page is a direct signal to remove the page from its index. Therefore, 410’s can be powerful for SEO but should be used with care.
SEO Application: A 410 status code should only be applied to pages that are to be removed permanently and never to come back. If a page is going to be temporarily unavailable a 404 status code should be applied.
A 5xx error code is served when the client makes a valid request to the server, but the server is unable to process the request. For the user, the page will not load and for the bot, the page will not be available to crawl. These errors can cause big issues for SEO.
If a server responds with a 5xx error, the crawl efficiency of the site will be reduced or even worse, bots will not crawl the site until the errors are fixed.
The impact on the crawl rate could mean delays in getting new content indexed or even a loss of organic visibility across the site.
For Google, serving their users a positive user experience is paramount, 5xx page errors harm this and should be avoided at all costs.
500 – Internal Service Error
A 500 error indicates there is a problem with the server but the problem is not specified. This means the server is unable to serve the requested page.
Link equity will not flow through these pages and for both users and bots, these pages are dead ends. As mentioned above, search engines will reduce their crawl budget for sites with these errors, so it is important to investigate and fix 500 errors as soon as they are found.
SEO application: 500 errors harm your site’s crawlability, so it is important to be aware of when these errors occur. Scheduling routine checks for 500 errors pages is a way to minimise this, there are reports in Google Search Console to find pages serving this error.
503 – Service Unavailable
Pages serving a 503 error indicate the server is temporarily unavailable. The page response to both humans and bots, is to check back at a later time. 503 codes can occur due to temporary errors, such as a server overloading or maintenance on the server.
Similar to a 500 error, Google will reduce its crawl rate when faced with this error. However, as 503’s are short term errors, Google will keep the page in its index ready to serve to users once the 503 error is rectified – no ranking power is lost with a 503!
It is important to note that if a 503 is served for long periods of time, Google will treat it as a 500.
SEO application: If your site is under maintenance, serving a 503 will ensure that crawlers come back later, when the site is ready to be crawled.
We hope from reading this article you understand the importance of HTTP status codes, the differences between them and when they should be used. Once you have grasped the difference between the priority status codes it will make it much quicker to diagnose issues on a website.
If you are facing technical SEO issues with your website please visit our technical SEO services page for more information.