Skip to content
ExponaBLOG
TECHNICAL SEO FOR DEVELOPERS · DAY 069 / 100

Out-of-stock product pages: patterns, pitfalls and fixes

Don't delete them on reflex.

Expona Admin7 min read

E-commerce teams often reach for the delete button when inventory runs dry, but removing out-of-stock product pages can haunt your SEO for months. We've seen merchants lose organic traffic, break user journeys, and confuse search engines by handling inventory changes carelessly. Out-of-stock product pages: patterns, pitfalls and fixes is a framework that separates temporary blips from permanent losses and routes each scenario to the right HTTP response and user experience.

Why out-of-stock pages matter to search engines

Search engines treat product pages as valuable content. If that page has accumulated backlinks, earned ranking positions, and driven traffic over time, deleting it wastes all that equity. Googlebot sees the page one day, then gets a 404 or finds it vanished entirely, and has to recrawl and re-evaluate—a process that can take weeks or months depending on crawl budget and site authority.

The real cost isn't just lost rankings. It's the confusion you create across your entire product ecosystem. Related products, category pages, and internal links all break or point to dead ends. Users land on old search results expecting a product they wanted, find nothing, and leave. Your bounce rate spikes and conversion rate dips in ways that analytics won't clearly explain until you map it back to inventory changes.

The pattern boils down to three scenarios, each with a different answer.

Temporarily out: keep the page, mark availability

When a product is out of stock but expected to return—say, within days or weeks—your best move is to keep the page live and update its availability status. This preserves the URL, the SEO equity, the user experience, and the search engine's understanding of what the page represents.

What this looks like:

  • Add an in-page notice near the product title or CTA: "Out of stock. Expected to restock on [date]" or "Notify me when back in stock."
  • Set the schema.org availability property to OutOfStock or use sku with inventoryLevel set to 0.
  • Keep the HTTP status at 200 OK. Do not return 404 or 410.
  • Consider lowering the page priority in your sitemap, but don't remove it.

From a structured data perspective, Google understands the Offer schema with availability: OutOfStock. Rich results and search appearance won't suffer; Google will simply show the page with an "Out of stock" label in search results, which is honest and often converts searchers looking to pre-order or set alerts.

Code example:

html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Premium Wireless Headphones",
  "sku": "WH-1000XM4",
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/products/wh-1000xm4",
    "priceCurrency": "USD",
    "price": "299.99",
    "availability": "https://schema.org/OutOfStock",
    "inventoryLevel": 0
  }
}
</script>

This approach also helps with user retention. Many visitors will sign up for a restock notification rather than bounce immediately. That list becomes a warm audience you can email when inventory returns, driving a quick traffic and conversion spike.

Permanently gone with a replacement: use 301 redirects

When a product reaches end-of-life and you have a direct successor—a newer model, improved version, or different SKU that serves the same purpose—a permanent redirect (HTTP 301) is the right move.

Why 301 and not 302: A 302 (temporary redirect) tells search engines the original page might come back. A 301 tells them the move is permanent, so they transfer the ranking power and link equity to the destination. Over a few weeks, the old URL disappears from search results and the new one inherits the traffic.

When this applies:

  • A smartphone model is discontinued; you redirect to the new generation.
  • A shirt size or color variant is permanently removed; you redirect to a similar product in the same collection.
  • A book edition goes out of print; you redirect to the revised edition.

The destination should be as relevant as possible. Redirecting a specific product variant to a broad category page (e.g., "All Phones") dilutes the user intent and wastes the accumulated trust. Aim for a 1:1 mapping when you can.

Implementation:

html
# .htaccess (Apache)
Redirect 301 /products/discontinued-phone /products/new-phone-2024

# nginx
location = /products/discontinued-phone {
  return 301 /products/new-phone-2024;
}

In your application, this might be a row in a product_redirects table queried at request time, or a configuration file that your reverse proxy (Nginx, CloudFront, etc.) consults. The key is consistency: every request to the old URL must resolve to the new one with a 301 status before any content is served.

Monitor Search Console for a few weeks after the redirect. You should see the old URL's impressions and traffic shift to the new one. If they don't, it may signal that the redirect isn't perceived as a natural successor, or that the new page isn't ranking for the same queries.

Gone with no replacement: 404 or 410

When a product is truly retired and you have no suitable alternative to redirect to, return either a 404 (Not Found) or 410 (Gone) status code. The difference is subtle but meaningful.

404: Tells search engines the resource doesn't exist right now, but might exist later. It's the default "page not found" response. Most teams use 404 for everything.

410: Tells search engines the resource is permanently gone and will never return. Search engines can drop it from the index faster and stop spending crawl budget on it. The downside: very few users or tools distinguish between 404 and 410, so the difference is mostly for SEO benefit.

Use 410 if you're confident the product will never return. Use 404 if there's any chance—even years away—that you might resurrect the product under a new SKU or variant.

What the user sees:

Don't just serve an empty 404 page. Provide a helpful landing page that acknowledges the product is gone, offers search functionality, or suggests related items. This reduces bounce rate and keeps users engaged.

html
<!DOCTYPE html>
<html>
<head>
  <title>Product Not Found</title>
  <meta name="robots" content="noindex, follow">
</head>
<body>
  <h1>This product is no longer available.</h1>
  <p>We've removed it from our catalog as it's been discontinued.</p>
  <h2>Similar products you might like:</h2>
  <ul>
    <li><a href="/products/replacement-1">Replacement Product 1</a></li>
    <li><a href="/products/replacement-2">Replacement Product 2</a></li>
  </ul>
  <p><a href="/search">Search our catalog</a></p>
</body>
</html>

Include the noindex meta tag to prevent search engines from indexing the 404 page itself. This stops it from appearing as a standalone search result and confusing users further.

Show alternatives to keep users

Whether a product is temporarily out of stock, being redirected, or permanently gone, your responsibility doesn't end with the HTTP response. Show users where to go next.

For out-of-stock pages:

  • Display other variants (sizes, colors, versions) that are in stock.
  • Show similar products from the same category or brand.
  • Offer a notification option so users can be alerted when the product returns.

For redirected or gone pages:

  • On the destination page, acknowledge the redirect and explain the relationship if it's not obvious.
  • Link back to the category or collection so users can explore related products.
  • For a 404 page, prominently display related products, search, or browse options.

From a technical SEO angle, this also helps. Internal links to these alternative products strengthen their authority and give search engines more pathways through your site. Users who stay on-site and browse alternatives are more likely to convert than those who bounce.

Example: out-of-stock page with alternatives

html
<div class="product-status">
  <p class="alert alert-warning">
    <strong>Out of stock.</strong> Expected back in 5–7 days.
    <a href="#notify-me">Get notified when available</a>
  </p>
</div>

<div class="alternatives">
  <h2>Other options:</h2>
  <ul>
    <li><a href="/products/item-blue">Same product, blue variant (in stock)</a></li>
    <li><a href="/products/item-upgraded">Upgraded version (higher capacity)</a></li>
    <li><a href="/products/competitor-item">Similar item from our partners</a></li>
  </ul>
</div>

Common mistakes

Deleting pages instead of marking them out of stock: Losing SEO equity and user flow in one click. Temporary stockouts don't warrant deletion.

Using 302 for permanent product retirements: Search engines keep treating the old URL as primary, delaying or preventing transfer of rankings to the replacement.

Redirecting to a broad category page instead of a specific replacement: Users land on a category with hundreds of items and leave. You waste the redirect and confuse intent signals.

Not updating structured data when inventory changes: Keeping old availability: InStock schema while the page is out of stock confuses search engines and sets false expectations in rich results.

Ignoring user experience on error pages: A blank 404 page or a redirect without context drives bounce rates up and damages the trust you've built.

Forgetting to remove old redirects: After six months or a year, archived redirect rules clog your config and slow request processing. Review and clean up old redirects periodically.

Key takeaways

  • Keep temporarily out-of-stock pages live with updated availability schema and user-friendly messaging.
  • Use 301 redirects only when you have a direct, permanent replacement product.
  • Return 404 or 410 status codes for truly discontinued products with no replacement.
  • Always provide alternative products or search options to reduce bounce rate and keep users engaged.
  • Update structured data (schema.org availability) whenever inventory status changes.
  • Use noindex on 404 pages to prevent them from competing in search results.
  • Monitor Search Console for redirect effectiveness and old URL performance over time.
  • Treat out-of-stock and product discontinuation as separate problems with separate solutions.
ShareXLinkedInReddit

Found this useful? Support the writing.

Buy me a coffee
Written by
Expona Admin
Site administrator

Comments

Loading comments…

Leave a comment

Comments are reviewed before they appear. Be kind and stay on topic.

Related articles