Large ecommerce sites have products coming in and out of stock constantly. For SEO, this offers a challenge of how we are going to handle this. There are many different ways that stock can come and go:
- A product has been removed permanently from the shop
- A product is temporarily out of stock
- A product has expired but should remain on the website
These are the 3 typical situations where a status code may be necessary to ensure best practice SEO. Each of these three examples will need to be handled in a different way and doing this at scale can be time-consuming and will need a solid status code strategy in place to deal with them.
Product has been removed permanently from the shop
When a product has been removed from a shop this will often create a 404 straight away. This acts as a dead-end to the website and will waste valuable crawl budget along with providing poor UX. For maximum SEO benefit, we need to review placing out of stock products as a 404 straight away. There a few things that we have to review before we go straight for a 404:
- Does this page have any backlinks?
- Does this page rank for keywords?
- Is this page receiving organic traffic?
If the answer to any of the above is yes then a blanket 404 would get rid of all of the SEO value that the page is carrying straight away. There needs to be a much more measured approach.
This is where we would look at implementing a RELEVANT 301 redirect through to a similar page. Often people will decide to redirect the product back to category/homepage but this provides very poor UX and can cause a soft-404 to come through in search console.
If the page is ranking for keywords and receiving organic traffic then a 404 would also get rid of that straight away and is likely to increase the bounce rate of the site and affecting the UX. Implementing the most relevant 301 redirect would mean the newly redirected to product page would have the best chance at taking the original position in the SERPs.
So to summarise when removing an out of stock product there needs to be a few questions you ask before deciding on how to manage the status codes:
- What is the most relevant page I can redirect this too?
- Does this page have any SEO ranking signals such as backlinks or keywords? If yes then 301 redirect it to its most relevant page to avoid soft-404’s
- If the page has no SEO value then 404 and wait for it to drop out of the index naturally
Flatspot tackles this issue by redirecting any out of stock products to the most relevant main category page. By looking at Flatspot’s backlink profile in ahrefs we can see all the links that are pointing towards redirected pages which illustrates this.
The fashion website Highsnobiety has a link going through to a product page within Flatspot’s website which then redirects back to the main ‘Nike SB’ category.
This is a great example of preserving SEO value of a product page and ensuring that the 301 redirect goes to the most relevant page.
If you wish to be very granular then you can provide a 410 status code for a product if it’s permanently removed. A 410 means ‘gone’, this shows a deliberate act by the webmaster to tell a search engine that this resource has been removed an won’t be coming back. Many webmasters will choose to 410 a 404 after around a month or so after it’s dropped off the index.
Product has gone temporarily out of stock
Many sites will have products which will go in and out of stock for various reasons, we don’t want to add any status codes to these products as the pages will eventually become fully ecommerce again soon. These are more UX considerations but there is things we can put in to place to get maximum value.
Capture a user’s details
If a product goes out of stock, you need to make sure you’re capturing a user’s information to inform them when it comes back in stock. A simple box letting a user enter their email to a list which drops them a message when it comes back in stock should suffice.
Routeone.co.uk have a clear CTA which lets a user fill out their details for when a product is coming back in stock.
Offer similar products
Rather than just a flat ‘out of stock’ message, you should try and suggest some similar products to a user. This will avoid high bounces rates and keep users engaged with your site and lead to that all important conversion.
Sunglasses.co.uk keep their product pages as 200 but have an ‘customers who bought’ section which gives users a chance to continue through the website by showing other products that people who purchased the sunglasses had bought.
Show ‘Out of Stock’ in structured data
You can edit your structured data to show the product as out of stock
This is a great way to tell search engines directly that the product is out of stock, hooking this into your ecommerce functionality is a quick way of managing this.
Make it clear that the product is out of stock
Nothing is more frustrating than going on to a product page, looking at the images and selecting your size only to find out a tiny red box saying ‘out of stock’ at the bottom. It needs to be abundantly clear to the user straight away that the product is out of stock.
Push the out of stock product to the bottom of the category
If you implement some logic within your categories to put out of stock products at the end this will give a much stronger user experience and will prevent a customer from having the scroll through pages of out of stock items before they can find one in stock they want to purchase.
A product has expired but wants to remain on the website
This is the rarest situation than the previous two but it’s one that does crop up from time to time. An example of this would be a high-ticket item that only had a few in stock or the product is still used for PR purposes.
When this occurs it’s best to move the product to a ‘hall of fame’ area of the website which acts as an archive of products that are out of stock but it is a reference for any old information and will preserve any backlink equity. This will need a 301 redirect from the old product URL to the new archive section.
A great example of this is the Yeezy 350 Boost V2’s which will never be in stock for longer than a couple of hours but will continue to drive organic traffic. Let’s see how JD Sports deal with this:
JD rank at position #2 for the term ‘Yeezy Boost 350’ which will have a huge amount of search volume. The first thing we can see straight away is they are using the correct structured data markup to show a user that the product is out of stock.
This will give a great user experience as your visiting the site under no illusions that you will find the trainers in stock.
When you land on the page you receive a popup which clearly lets you know it’s out of stock and tries to redirect you round to the the ‘latest’ category. This makes sense to a user as people looking for Yeezy’s will often want to have the latest fashion, these types of decisions are what makes a solid out of stock strategy!
They also use very clear visuals to show that no sizes are available to yet again hammer home the point these trainers aren’t in stock.
It’s not a complicated science on managing your status codes but it’s something that needs common sense and a bit of thought put into it to make sure you’re not harming your search engine visibility. Some of the key takeaways from the above points:
- When 301 redirecting always redirect to the most relevant page and not just the homepage to avoid soft 404’s
- Always review if a page has any backlinks or keywords attached to it before making a decision to 404
- Provide a great user experience to someone finding out the product they’re after is out of stock. Make it clear and offer alternatives such as mailing lists and a related products section
- 404’s aren’t always a bad thing, they are best practice if used correctly!