Skip to content
AE DIGITAL
Technical SEOBy 5 min read

Out-of-stock and discontinued products: how to keep your rankings

An SEO decision tree for out-of-stock, replaced or discontinued products: when to keep the page, when to use 301, 404 or 410, structured data and handling it on Shopify.

Article cover: the word “404” next to a glowing icon on a violet space background

Temporary or permanent: the first question

When a product is unavailable, the SEO decision comes down to one question: will it be back on sale? Three scenarios follow, each handled differently.

  1. Temporarily out of stock: the product will return, even without a confirmed date. The page stays online.
  2. Replaced: a new model or version serves the same search. The old page redirects or points to the new model.
  3. Permanently discontinued: it won't return and has no direct replacement. You choose between a redirect to a relevant page and a 404 or 410 response.

The most common mistake is treating every case the same: deleting every product that hits zero stock or, the other way round, leaving pages for items that will never return online for years. The first throws away accumulated rankings and links; the second fills the catalogue with pages that disappoint search visitors.

Temporarily out of stock: keep the page

If the product is coming back, the page must stay reachable with a 200 status and remain indexable. It already has history, internal links and possibly external ones: removing it for a few weeks means starting from scratch when stock returns.

What to show on the page

  • A clear status next to the price: "Out of stock", with the restock date if you know it.
  • A back-in-stock alert form connected to your email tool.
  • Two or three similar products that are available, above the fold on mobile.
  • All the original content: description, specifications, reviews. A page stripped down to a "not available" message risks being read as a soft 404.

In collections you can push it to the bottom of the sort order instead of removing it, so it remains a useful internal link for crawling. Internal links from collections and filters are covered in our article on Shopify collections and filters SEO.

Replaced by a new model

If the new model meets the same need, a 301 from the old page to the new one is the cleanest option. In its status code documentation, Google describes a permanent redirect as a strong signal that the target should be processed instead of the original.

There is one exception worth considering. If the old page still has its own demand, for example customers looking for the old model's manual, spare parts or compatibility, it may be better to keep it online with a prominent notice and a link to the new model. The page then keeps serving existing buyers, and the availability in structured data becomes Discontinued.

Permanently discontinued: 301, 404 or 410

For a product that won't return and has no direct replacement, there are two routes.

A 301 to a relevant page

This makes sense when there is a destination that satisfies people looking for that product: a very similar item or the category it belonged to. Google's site move guide warns, however, against redirecting many old URLs to a single irrelevant destination such as the home page, as it can confuse users and may be treated as a soft 404.

404 or 410

If there is no sensible destination, the page should return an error. According to Google Search Central, all 4xx codes except 429 are treated the same way: the URL is removed from the index. A 410 states more explicitly that the removal is intentional but has no documented advantage over a 404. Customize your error page with search and main categories.

To decide case by case, look at three data points: organic clicks over recent months, external links to the page, and whether a real alternative exists. The reasoning we use for content pruning of articles applies to product pages too.

Availability in structured data

Structured data must reflect the real status. In Google's merchant listing documentation, the offers.availability property takes values from the schema.org ItemAvailability vocabulary, including:

  • InStock: available to buy now.
  • OutOfStock: currently unavailable.
  • BackOrder: can be ordered for later delivery.
  • PreOrder: can be reserved before release.
  • Discontinued: no longer made or sold.

Google accepts one value per offer. Make sure the markup updates together with stock: an out-of-stock product still marked InStock also creates mismatches with your Merchant Center feed. If you generate markup from the catalogue, the logic is the one described in our guide to dynamic schema markup.

Handling it on Shopify

On Shopify the behaviour depends on a few settings.

  • Temporary stockout: with inventory tracking on, at zero quantity the product can't be added to the cart but the page stays live. The "Continue selling when out of stock" option lets you take orders at zero stock; in that case the correct availability is BackOrder, not InStock.
  • Removed product: setting the status to Draft or removing the product from all sales channels makes its URL return 404.
  • Redirects: create them under Content > Menus, View URL Redirects, Create URL redirect. Shopify states that redirects only work for URLs that return 404, so draft or delete the product first and then create the redirect. For many URLs there is a CSV import.

Watch the order of operations: a redirect created while the product page is still active won't fire. Our Shopify technical SEO guide covers the other settings that affect crawling.

Monitoring the impact

After every catalogue change, check the page indexing report in Google Search Console, especially "Not found (404)" and "Soft 404". The latter flags pages that return 200 but look empty or like an error. Spot-check redirects with a tool that shows the status code, and avoid redirect chains created by successive replacements.

If you run a Shopify catalogue that changes often and want clear rules for stockouts and discontinued items, we can help through our Shopify ecommerce setup service.

Frequently asked questions

Should I noindex out-of-stock products?

Not if they are coming back. The page keeps its rankings and links, and visitors can sign up for a back-in-stock alert or pick an alternative. Noindex only makes sense in special cases, such as products that won't return but that you want existing customers to still be able to consult.

404 or 410 for a deleted product?

Google treats them the same: Search Central documentation says all 4xx errors except 429 are handled alike and the URL is removed from the index. A 410 simply states more explicitly that the removal is intentional.

Can I redirect deleted products to their category?

Yes, if the category genuinely offers alternatives to people looking for that product, as in Shopify's example of redirecting a deleted t-shirt to the t-shirts collection. Redirecting many URLs to a page with little relevance, such as the home page, may be treated as a soft 404.

Which availability value should I use in structured data?

The real one: InStock, OutOfStock, BackOrder if you accept orders for later delivery, PreOrder before launch, Discontinued if the product is no longer made or sold. Google accepts only one value per offer.

Sources

  1. How HTTP status codes, and network and DNS errors affect Google Search — Google Search Central
  2. Site moves with URL changes — Google Search Central
  3. Merchant listing (Product, Offer) structured data — Google Search Central
  4. ItemAvailability — Schema.org
  5. Creating URL redirects — Shopify Help Center
  6. Selling when out of stock — Shopify Help Center

Related articles

Tell us what isn't working.

We reply within one business day with a first opinion and, if it makes sense, a quote.

Write to us