Check 20.08 · E-commerce SEO

Display actual availability

Show accurate, up-to-date availability (in stock, preorder, out of stock) on the product page, in markup and in the feed, on WooCommerce, Shopify, PrestaShop or Magento.

Priority
Critical
Difficulty
Intermediate
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

Displaying actual availability means stating on each product page whether the product is in stock, in limited quantity, on preorder, on backorder or sold out, based on the real stock and at the moment the page is served. The same status must appear in the structured data and in the Merchant Center feed. Once the task is done, no product page announces “in stock” for a product that cannot be shipped, and caches are purged when stock changes.

Why it matters

Google shows availability in its product results and in Shopping. The Merchant Center specification requires the availability attribute to match the landing page, checkout and structured data. When it does not, Merchant Center flags a mismatch and may disapprove the product; Google also states that it may update its copy of your data from the content of your site when it detects a difference.

For visitors, wrong availability is costly: canceled order, refund, negative review. For an AI assistant that recommends products, availability is one of the criteria: OpenAI lists availability among the factors taken into account in ChatGPT's shopping results. Displaying an accurate status guarantees no recommendation, but a wrong status can get an unavailable product recommended, and then disappoint.

The problem rarely comes from the product page itself: it comes from caches (page, CDN, plugin), from stock updated with a delay, or from markup hard-wired to InStock by the theme.

What it improves

  • Merchant listings and Shopping Fewer disapprovals for availability mismatches.
  • Conversion rate Visitors know whether they can receive the product, and when.
  • Customer service Fewer canceled orders and complaints.
  • AI assistant recommendations Reliable availability. A possible effect, not proven.
  • Trust Fewer negative reviews tied to stockouts discovered after payment.
  • Organic rankings No proven direct effect.

How to check

Choose an in-stock product, a sold-out product and, if you have one, a product on preorder:

for url in https://example.com/produits/sencha-bio-100g/ https://example.com/produits/matcha-ceremonie-30g/; do
  echo "$url"
  curl -s "$url" | grep -o -E '"availability" *: *"[^"]*"'
  curl -s "$url" | grep -o -i -E "en stock|rupture|épuisé|précommande|disponible le[^<]*" | head -n 3
done

Compliant: the visible text and the availability value say the same thing, and match the stock in the back office.

Also test the cache: set a product to out of stock in the back office, then reload the product page in a private window and with curl. If the page still announces “in stock” several minutes later, the cache is not purged when stock changes.

In Merchant Center, the product diagnostics flag availability mismatches between the feed and the page.

How to implement

Before you start

Status mapping between your back office, the page, schema.org and Merchant Center:

Actual situation Text displayed schema.org availability Merchant Center availability
Stock available In stock, ships within 24 h InStock in_stock
Low stock Only 3 left in stock LimitedAvailability or InStock in_stock
Not yet released, can be ordered Preorder, ships on January 15 PreOrder preorder + availability_date
Sold out, can be ordered with a delay On backorder, ships within 3 weeks BackOrder backorder + availability_date
Sold out, cannot be ordered Sold out, expected back in February OutOfStock out_of_stock
Permanently withdrawn No longer made Discontinued Remove from the feed

Rules:

  • A single status per offer, calculated from sellable stock (physical stock minus reservations).
  • A date when you have one: preorder and backorder display the expected date. Merchant Center requires availability_date for a preorder, at most one year in advance, and the date must be visible on the page.
  • Do not display fake low stock (“only 2 left!”) to push people to buy: it is a misleading practice.
  • Per variant: the availability displayed and marked up is that of the selected variant.

Temporarily sold-out products are covered by manage temporarily out-of-stock products (opens in a new tab) (keep the page, offer an alert and alternatives); discontinued products by manage permanently discontinued products (opens in a new tab).

Caches: the status must be up to date at the moment the page is served. Three options, from the simplest to the most granular:

  1. Targeted purge of the product page (and of the categories that display it) on every change of stock status: most cache plugins and CDNs support it.
  2. Short cache duration on product pages (a few minutes) if a targeted purge is impossible.
  3. Status rendered on the server, exact quantity loaded separately: the HTML and markup carry the status, and a lightweight call displays the remaining quantity.

Warning: do not render the availability status with JavaScript only. The initial HTML and the JSON-LD must already carry the right value, otherwise crawlers that do not run JavaScript read wrong or missing information.

Merchant Center: update the feed at least as often as your stock changes significantly (a feed scheduled several times a day, or the API). Automatic item updates, in the Merchant Center settings, let Google correct price and availability from your pages when there is a mismatch: useful as a safety net, not as the main mechanism.

WordPress

Versions WordPress 6.4 and later, WooCommerce 9 to 11.

WooCommerce > Settings > Products > Inventory:

  • Manage stock: enable stock management.
  • Low stock threshold and Out of stock threshold: the second switches the product to out of stock when the quantity reaches it.
  • Out of stock visibility: leave unchecked the option that hides out-of-stock items from the catalog, unless you have a specific reason; a hidden product page disappears from listings but not necessarily from the index.
  • Stock display format: always show the quantity, show it only when it is low, or never show it.

On each product page, Inventory tab: quantity, and Allow backorders? (Do not allow, Allow, but notify customer, Allow). WooCommerce marks up InStock, OutOfStock or BackOrder depending on the state. For preorders, a dedicated plugin is required; check that it switches the markup to PreOrder.

With a cache plugin (WP Rocket, LiteSpeed Cache, W3 Total Cache), check that the product page is purged when its stock changes, especially after an order: run the test from the “How to check” section.

Shopify

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

On the product or the variant, Inventory section: Track quantity and Continue selling when out of stock. A variant with zero quantity that does not allow selling when out of stock is unavailable; the theme's structured_data filter includes this availability per variant.

In the theme editor (Dawn), the Inventory status block of the product section displays the stock status, with an adjustable low inventory threshold. Shopify manages the store's cache: availability is up to date without any setting. If you use a preorder app, check the displayed text and the product markup on a product page on preorder.

PrestaShop

Versions PrestaShop 8 and 9.

Shop Parameters > Product Settings, stock section:

  • Enable stock management.
  • Allow ordering of out-of-stock products, globally, and the per-product behavior in the Stocks tab of the product page.
  • Label of in-stock products, Label of out-of-stock products with allowed backorders, Label of out-of-stock products with denied backorders, and the corresponding delivery times.
  • Display available quantities on the product page and the threshold for the “Last items in stock” display.
  • Display out-of-stock label on product listings.

On the product page, the availability date is displayed when the product or the combination is sold out. Clear the cache (Advanced Parameters > Performance) if you use a page cache module.

Magento

Versions Magento Open Source and Adobe Commerce 2.4.7 to 2.4.9.

Stores > Configuration > Catalog > Inventory > Stock Options: display of out-of-stock products (Display Out of Stock Products), the “Only X left” threshold (Only X left Threshold) and the availability display on the product page. On the product page, Quantity and Stock Status. With Varnish or the built-in page cache, Magento invalidates product pages whose stock changes; check this after a test order, and check that the markup extension actually uses the real status.

Laravel

Versions Laravel 11 to 13.

Calculate the status in the model and use it everywhere:

public function availability(): string
{
    if ($this->is_discontinued) {
        return 'Discontinued';
    }

    if ($this->release_date?->isFuture()) {
        return 'PreOrder';
    }

    if ($this->sellableStock() > 0) {
        return 'InStock';
    }

    if ($this->allow_backorder) {
        return 'BackOrder';
    }

    return 'OutOfStock';
}

Purge the page on every stock movement, for example in an observer:

public function updated(Product $product): void
{
    if (! $product->wasChanged('stock')) {
        return;
    }

    Cache::forget("product-page:{$product->id}");
}

If a CDN caches the product pages, add a call to its purge API for the product URL.

Next.js

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

For a statically generated product page, cache the data request with a tag, then revalidate it on every stock change. Since Next.js 15, fetch is no longer cached by default: cache: 'force-cache' keeps the response in the cache so that the tag has something to invalidate.

// lib/products.ts
export async function getProduct(slug: string) {
  const res = await fetch(`${process.env.API_URL}/products/${slug}`, {
    cache: 'force-cache',
    next: { tags: [`product-${slug}`] },
  });

  return res.json();
}

Protect the webhook with a secret shared with the stock system. The status is rendered on the server in the page and in the JSON-LD.

Next.js 16

// app/api/stock-webhook/route.ts
import { revalidateTag } from 'next/cache';

export async function POST(request: Request) {
  const { slug } = await request.json();
  revalidateTag(`product-${slug}`, { expire: 0 });

  return Response.json({ revalidated: true });
}

The { expire: 0 } profile expires the data immediately: the next request waits for the new value instead of serving the old one, which suits a stock status. The single-argument form is deprecated since Next.js 16.

Next.js 15

// app/api/stock-webhook/route.ts
import { revalidateTag } from 'next/cache';

export async function POST(request: Request) {
  const { slug } = await request.json();
  revalidateTag(`product-${slug}`);

  return Response.json({ revalidated: true });
}

In Next.js 15, revalidateTag takes only the tag and expires the data right away: the next request reloads the up-to-date value.

Cloudflare

Versions Cloudflare dashboard and API, all plans, November 2026.

If the HTML product pages are cached at the edge, purge the product URL on every stock change through the purge API (purge by URL), called from your back office or your plugin. Failing that, keep a short cache duration on product pages in the Cache Rules.

Common mistakes

  • InStock hard-coded in the markup of the theme or an app.
  • Page cache not purged after an order that exhausts the stock.
  • Status loaded only with JavaScript, missing from the initial HTML.
  • A preorder with no date, or a date not shown on the page even though it appears in the feed.
  • The default variant's availability displayed for every variant.
  • Fake low stock displayed permanently.
  • Sold-out products hidden from the catalog but left in the feed with in_stock.

Frequently asked questions

Should out-of-stock products be removed from the site?

No, not for a temporary stockout. Keep the product page online, with the sold-out status, the restock date if you know it, a back-in-stock alert and alternatives. Removing the page and then putting it back loses its history and its links. Only permanently discontinued products justify removal, with a redirect to an equivalent when one exists.

What happens if availability differs between the site and Merchant Center?

Merchant Center compares the availability in the feed with that of the landing page and the structured data. If there is a mismatch, it flags an error and may disapprove the product until it is fixed. Google may also update its copy of your data from your site. The lasting solution is to generate the feed, the page and the markup from the same stock, updated frequently.

How do you indicate a preorder in structured data?

Use the PreOrder value in the Offer's availability property, and display the expected shipping date on the page. In the Merchant Center feed, the availability attribute takes the preorder value, which must be accompanied by availability_date in ISO 8601 format, at most one year in advance. The date must be the same on the page and in the feed.

Should the exact quantity in stock be displayed?

It is not mandatory. Displaying “in stock”, or “only 3 left” when stock is low, is generally enough and avoids revealing your volumes. What matters is that the status is true at the moment the page is served. Never display fictitious low stock to rush the purchase: it is a misleading commercial practice that eventually shows.

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