Hey,
If a product is out-of-stock temporarily, best practice is to link to alternative products, for example:
- Newer models or versions.
- Similar products from other brands.
- Other products in the same category that match in quality and price.
- The same product in different colours.
This provides a good service to customers and helps search engines find and understand related pages easier.
If a product is out-of-stock permanently there are three main options.
1: Product returns a 410 (or 404) Not Found status.
Google understands 410 and 404 Not Found pages are inevitable, but the problem with creating too many of them is it reduces the time search engine crawlers will spend visiting the pages that actually should rank. If this option is implemented, ideally there should be signposts to related products on the Not Found page.
2. 301 permanently redirect old product to existing product (e.g. newer version or close alternative).
A dynamically generated message should clearly display on the page e.g. “Product X is no longer available. This is a similar product/the replacement product.”
This option is recommended if redirect chains can be minimised, e.g. if product turnover is high the following could happen in a short timeframe:
- Product 1 no longer exists and gets 301 redirected to Product 2.
- Product 2 no longer exists and gets 301 redirected to Product 3.
- Now a redirect chain exists: Product 1 redirects to Product 2 which then redirects to Product 3. Product 1 would need to be updated to redirect to Product 3, without the intermediate redirect to Product 2.
3. 301 permanently redirect old product to parent category. A dynamically generated message should clearly display on the page e.g. “Product X is no longer available. Please see similar products below.”
As categories are likely to change less often than products, this is potentially easier to implement than option 2.