Check 20.16 · E-commerce SEO

Manage temporarily out-of-stock products

Keep a temporarily out-of-stock product online and indexable: a clear status, a restock date, an alert, alternatives, and up-to-date structured data and feeds.

Priority
Critical
Difficulty
Easy
Estimated time
2 h to 1 day
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A product that is temporarily out of stock will come back: its page must stay online, return a 200 and remain indexable. This check means clearly showing that it is unavailable, the restock date if you know it, a back-in-stock alert and alternatives, and updating availability in the structured data and in Merchant Center. Once it is done, running out of stock no longer costs the page its rankings or the visitor who lands on it.

Why it matters

The page of an out-of-stock product has often built up rankings, links and reviews. Deleting it, setting it to noindex or redirecting it while waiting for restocking means losing that capital and having to rebuild it when the product returns, with no guarantee of getting it back.

Conversely, a page that says nothing about the stockout misleads the visitor, and a page stripped of its content, reduced to “product unavailable”, looks like an error page: Google may classify it as a soft 404 (a page that returns 200 but whose content signals an error or an empty page) and drop it from the index.

Availability is also data that Google reads. In structured data, the availability property accepts values including InStock, OutOfStock, BackOrder and PreOrder. In Merchant Center, the availability attribute accepts in_stock, out_of_stock, preorder and backorder, with an availability_date required for the last two, and that date must be visible on the page. A page that says “out of stock” while the feed says “in stock” gets the item disapproved.

AI shopping assistants compare merchants on availability and price: OpenAI's help center lists availability among the criteria for ranking merchants in ChatGPT. Up-to-date information avoids being recommended wrongly, or wrongly left out.

What it improves

  • Rankings preserved during the stockout and when the product returns.
  • Deferred conversion A back-in-stock alert, a pre-order or an alternative instead of a departure.
  • Merchant listings and free listings No disapprovals for mismatched availability.
  • Trust The visitor knows when to come back.
  • AI answers Accurate availability that assistants can read. No guaranteed effect.

How to check

  1. HTTP status code and indexability of an out-of-stock product:
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/produits/gyokuro/
curl -s https://example.com/produits/gyokuro/ | grep -i -o -E '<meta name="robots"[^>]*>|"availability":"[^"]*"'

Expected result: 200, no noindex, and "availability":"https://schema.org/OutOfStock" (or BackOrder, PreOrder).

  1. Content: the page keeps its description, photos and reviews, and shows the status near the price.
  2. Search Console: in Page indexing, the “Soft 404” reason must not contain out-of-stock product pages.
  3. Merchant Center: out-of-stock items appear with the “out of stock” availability, with no mismatched availability issue.
  4. Navigation: the product stays reachable from its category, even if placed at the end of the list.

How to implement

Before you start

Set the rule for the whole catalog:

Situation Status shown availability (schema.org) availability (Merchant Center) Can be ordered
Restock with no known date “Out of stock” + email alert OutOfStock out_of_stock No
Restock date known, orders accepted “Ships from December 12” BackOrder backorder + availability_date Yes
Product not yet released “Pre-order, released January 15” PreOrder preorder + availability_date Yes
One variant sold out, others available Grayed-out “sold out” option OutOfStock on that variant out_of_stock on that variant Other variants
No restock planned See manage permanently discontinued products (opens in a new tab) Discontinued or page removed Item removed from the feed No

On the page, while out of stock:

  • Keep the full content: description, photos, specifications, reviews.
  • Show the status near the price, as text, with the restock date if it is reliable.
  • Offer a “Notify me when back in stock” alert form.
  • Add a block of in-stock alternatives, as HTML links. See suggest relevant complementary products (opens in a new tab).
  • Do not change the URL, the canonical or the page's presence in the sitemap.

Warning: do not display a made-up restock date. A date that passes without restocking is misleading information, and Merchant Center requires the date in the feed to match the one on the page.

WordPress

Versions WordPress 6.8 and later, WooCommerce 10 and 11 (native back-in-stock alerts: WooCommerce 11.2 and later).

With WooCommerce, in the product, Product data > Inventory:

  • Stock status “Out of stock”, or set automatically at zero if “Track stock quantity for this product” is checked;
  • “Allow backorders?”: “Allow, but notify customer” displays “Available on backorder” and WooCommerce outputs BackOrder in its markup.

In WooCommerce > Settings > Products > Inventory, the “Hide out of stock items from the catalog” option removes these products from shop and category listings: the product page remains accessible, but no longer receives links from categories. Leave it unchecked if stockouts are short, or show out-of-stock products at the end of the list.

WooCommerce does not handle restock dates natively: a custom field displayed near the price takes care of that. For the email alert, WooCommerce 11.2 introduced back-in-stock notifications, offered as an experimental feature in WooCommerce > Settings > Advanced > Features; on an earlier version, or if you prefer a proven solution, a back-in-stock notification plugin does the job.

Shopify

Versions Shopify, all plans, Online Store 2.0 themes, November 2026.

The product stays online when its stock falls to zero: the theme shows “Sold out” and the buy button is disabled. On the product page, for each variant, the “Continue selling when out of stock” option allows orders; in that case, show the shipping date in the description or through a metafield, otherwise the shopper orders without knowing it.

  • Back-in-stock alerts require an app.
  • The Google & YouTube channel passes variant availability to Merchant Center.
  • Avoid apps or scripts that automatically hide or redirect sold-out products.

PrestaShop

Versions PrestaShop 8 and 9.

On the product page, in the stock section: quantity, behavior when out of stock (deny or allow orders), the labels shown for “in stock” and “backorders allowed”, and the availability date. The “Mail alerts” module (ps_emailalerts) offers back-in-stock sign-up. Do not disable the product during the stockout: an offline product is no longer served normally and goes through the redirect defined in the SEO tab.

Magento

Versions Adobe Commerce and Magento Open Source 2.4.7 to 2.4.9.

  • Stores > Configuration > Catalog > Inventory > Stock Options, “Display Out of Stock Products”: set to “No” (the default), out-of-stock products disappear from category listings and search. Switch to “Yes” if you want them to stay reachable through navigation, and check that they still return a 200 at their direct URL.
  • Stores > Configuration > Catalog > Catalog > Product Alerts, “Allow Alert When Product Comes Back in Stock”: “Yes” enables the back-in-stock alert.
  • Backorders are set in Stores > Configuration > Catalog > Inventory > Product Stock Options, “Backorders”, or product by product.

Laravel

Versions Laravel 11 to 13.

Keep the page served with a 200 and compute availability once for the display, the markup and the feed:

enum Availability: string
{
    case InStock = 'InStock';
    case OutOfStock = 'OutOfStock';
    case BackOrder = 'BackOrder';
    case PreOrder = 'PreOrder';

    public function feedValue(): string
    {
        return match ($this) {
            self::InStock => 'in_stock',
            self::OutOfStock => 'out_of_stock',
            self::BackOrder => 'backorder',
            self::PreOrder => 'preorder',
        };
    }
}
@if($product->availability === \App\Enums\Availability::BackOrder)
    <p class="stock">Ships from {{ $product->restock_date->translatedFormat('j F Y') }}</p>
@elseif($product->availability === \App\Enums\Availability::OutOfStock)
    <p class="stock">Out of stock.</p>
    @include('products.partials.back-in-stock-form')
@endif

In the JSON-LD, use "availability": "https://schema.org/{$product->availability->value}".

Next.js

Versions Next.js 15 and 16 (App Router).

Fetch stock on every request or with a short revalidation, combined with on-demand revalidation triggered by your inventory management system, so that the page, the JSON-LD and the feed do not diverge. Do not call notFound() for a product that is merely sold out.

Next.js 16 with Cache Components

When cacheComponents: true is enabled in next.config.ts, the export const revalidate option is no longer accepted. Cache the product read with a short lifetime and a tag:

import { cacheLife, cacheTag } from 'next/cache';

export async function getProduct(slug: string) {
  'use cache';
  cacheLife({ revalidate: 300 });
  cacheTag(`produit-${slug}`);

  return db.product.findUnique({ where: { slug } });
}

From your inventory system's webhook (a Route Handler), call revalidateTag(`produit-${slug}`, 'max').

Next.js 15, or 16 without Cache Components

Add export const revalidate = 300; to the page, and call revalidatePath(`/produits/${slug}`) from your inventory system's webhook.

Merchant Center

Update the feed's availability attribute with every change, and add availability_date for backorder and preorder. If your feed is only sent once a day, Merchant Center's automatic item updates can correct price and availability from your structured data, which requires accurate markup. See sync prices and stock across site, feeds and markup (opens in a new tab).

Common mistakes

  • Redirecting to the category during the stockout: the page loses its history, and the redirect will have to be removed when the product returns.
  • Setting the page to noindex or removing it from the sitemap for a few weeks.
  • Returning a 404 for a sold-out product, because of a platform setting or a plugin.
  • Stripping the page of its description and reviews: risk of a soft 404.
  • Keeping InStock in the markup because the template does not read the actual stock.
  • A restock date that has passed and is never updated.
  • Letting a “temporary stockout” drag on for months with no restock planned: that is a discontinuation and should be treated as one.

Frequently asked questions

Should you deindex an out-of-stock product?

No, not for a temporary stockout. Keep the page online, returning a 200 and indexable, with its full content, a visible “out of stock” status, a back-in-stock alert and alternatives. Deindexing or redirecting it loses the rankings and links it has earned, which will have to be rebuilt when the product returns. Only handle the page differently if the product will not come back.

Which availability value should you use for an out-of-stock product?

In structured data, use OutOfStock for a stockout where ordering is not possible, BackOrder if you accept orders with delayed shipping, and PreOrder for a product not yet released. In Merchant Center, the equivalents are out_of_stock, backorder and preorder, with a required availability_date attribute for the last two, and a date visible on the product page.

Can an out-of-stock product page be treated as a soft 404?

Yes, if it is stripped of its content. Google calls a soft 404 a page that returns 200 but whose content looks like an error or an empty page, for example a product page reduced to the message “product unavailable”. Keep the description, photos, specifications and reviews, and add alternatives: the page then remains a genuine product page.

How long should an out-of-stock product stay online?

As long as a restock is planned. When no return is scheduled, or the stockout lasts several months with no date, treat the product as permanently discontinued: redirect to an equivalent replacement, keep the page with a “no longer made” notice if it is still useful, or return a 404 or 410. The exact duration depends on your catalog and your suppliers.

Updated on

Topic checklist (PDF)

And now?

In the “E-commerce SEO” topic

  1. Optimize categories and subcategories
  2. Optimize product pages with original descriptions
  3. Avoid duplicated manufacturer descriptions
  4. Display specifications, dimensions and materials
  5. Display compatibility information
  6. Display available SKU, GTIN or MPN
  7. Display brand, price and currency
  8. Display actual availability
  9. Display shipping costs and delivery times
  10. Display return policies and warranties
  11. Add authentic reviews and Q&A
  12. Add original images and size guides
  13. Publish buying guides and comparisons
  14. Suggest relevant complementary products
  15. Manage variants
  16. Manage temporarily out-of-stock products
  17. Manage permanently discontinued products
  18. Control indexing of facets and internal search
  19. Implement Product, ProductGroup and Offer
  20. Implement compatible shipping and return markup
  21. Set up Merchant Center and free listings
  22. Set up Microsoft Merchant Center if relevant
  23. Monitor feed errors
  24. Sync prices and stock across site, feeds and markup
  25. Check eligible AI shopping features
  26. Check marketplaces
  27. Test AI product recommendations