Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Schema says InStock when sold out: how to find and fix it

SEO-212Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

Schema markup is a block of code (usually JSON-LD) that tells search engines facts about a page. On a product page, the offers object includes an availability property. Its value comes from the schema.org list: InStock, OutOfStock, SoldOut, PreOrder, BackOrder, LimitedAvailability, Discontinued and others.

Wrong: sold-out product still marked InStockjson
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Trail Backpack 30L",
  "offers": {
    "@type": "Offer",
    "price": "89.00",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock"
  }
}

Why it costs you leads or sales

Google can show availability in search results and Merchant listings. If it shows "In stock" and the visitor lands on a sold-out page, they leave. That wastes the click, and if you run Shopping or product ads, it wastes ad spend too.

How a wrong availability value loses the sale
  1. Search resultShows "In stock" from schema
  2. Click to product pageVisitor arrives expecting to buy
  3. Sold out buttonPage shows the real status
  4. Visitor leavesGoes to a competitor

The break is in the markup, so every later step is wasted.

Clicks on a sold-out productExample numbers
Clicks on a sold-out product (example)Clicks from result saying In stock: 100 clicks; Possible orders: 0 clicks; Bounced visitors: 100 clicks038771000100Clicks from result sa…Possible ordersBounced visitorsclicks

Example: 100 clicks a month on a sold-out product. Illustrative numbers only.

How to check if your site has it

Check the availability value on a sold-out product
  1. Find a sold-out product

    Open a product page that shows Sold out, Out of stock or a disabled Add to cart button.

  2. View the structured data

    Paste the URL into Google's Rich Results Test, or open the page source and search for availability.

  3. Compare the values

    If the page says sold out but the markup says InStock, you have the issue.

  4. Check variants

    If the product has sizes or colours, test a sold-out variant and an available one. Some themes only output the first variant's status.

  5. Check Search Console

    In Search Console, open Shopping > Merchant listings and look for availability warnings or mismatches. This report only appears if Google found product data.

How to fix it

The goal is one source of truth: the same stock data that drives the button should drive the markup. The right fix depends on how your schema is produced.

Fix availability by platform
  1. Turn on stock management

    In WooCommerce, edit the product and open Inventory. Tick Manage stock or set Stock status to Out of stock. WooCommerce's own schema reads this value.

  2. Find duplicate schema

    If an SEO plugin or the theme also outputs Product schema, one of them may hardcode InStock. Disable the extra Product schema in the plugin's schema settings.

  3. Clear caches

    Purge your caching plugin and any CDN so the new markup is served.

Shopify: availability from live stockliquid
"availability": {% if product.selected_or_first_available_variant.available %}"https://schema.org/InStock"{% else %}"https://schema.org/OutOfStock"{% endif %}
Custom PHP: map stock status to schema.orgphp
<?php
$map = [
  'instock'     => 'https://schema.org/InStock',
  'outofstock'  => 'https://schema.org/OutOfStock',
  'onbackorder' => 'https://schema.org/BackOrder',
];
$availability = $map[$product->stock_status] ?? 'https://schema.org/OutOfStock';
?>
"availability": "<?php echo $availability; ?>"
Availability markup

Before

  • Hardcoded InStock in the theme
  • Sold-out page still advertises stock
  • Cached markup never updates

After

  • Value read from live stock status
  • OutOfStock shown when sold out
  • Cache cleared when inventory changes

How to confirm it's fixed

Confirm the fix
  • Rich Results Test shows OutOfStock on a sold-out product
  • An in-stock product still shows InStock
  • A sold-out variant and an available variant each give the right value
  • The view-source output matches the visible button
  • Cache purged and the live URL retested in a private window
  • Search Console URL Inspection: Request indexing for key product pages

Google can take days or weeks to recrawl and update how a page appears in results. Requesting indexing in Search Console can speed this up for important URLs, but does not guarantee timing.

How to prevent it happening again

Prevention habits
  • Keep one source of Product schema (theme, SEO plugin or app, not several)
  • Never hardcode availability in templates
  • Test a sold-out product after theme, plugin or app updates
  • Purge caches automatically on inventory changes
  • Review the Merchant listings report in Search Console monthly
  • Spot-check a few sold-out and back-in-stock products after each sale or restock

How FunnelGuard handles this

FunnelGuard does not check this yet. Comparing schema availability with the visible stock status is a possible future check, but it is not part of the product today.

What FunnelGuard does cover nearby: a robot visitor runs your real customer journeys on a schedule, such as checkouts, lead forms and booking buttons, and checks each step and the tracking hits sent to ad and analytics platforms. If a broken product page stops the journey, you get one alert with a screenshot and a likely cause. It will not tell you that your markup says InStock.

To watch for this issue today, use the Rich Results Test on a sold-out product after changes, keep an eye on Search Console's Merchant listings report, and spot-check the page source. A free read-only website audit from FunnelGuard is available, though it is not a schema stock check.

Questions people ask

Why does my product schema say InStock when it's sold out?

Usually the theme, plugin or app hardcodes InStock or does not read the live stock status. It can also be a cached page serving old markup. Find where the Product schema is generated and make it read the real inventory value.

Does Google penalise wrong availability in schema?

Google's guidelines say structured data must match the visible page. Mismatches can trigger Merchant listing warnings and may make a page ineligible for rich results. A manual action is less likely for a simple stock error, but fix it promptly.

What is the correct schema value for a sold-out product?

Use https://schema.org/OutOfStock. For items you will restock, BackOrder or PreOrder may fit better. Use Discontinued if the product is gone for good.

How do I check my schema availability?

Paste the product URL into Google's Rich Results Test, or view the page source and search for availability. Do this on a product that is actually sold out and compare the value with what the page shows.

How do I fix wrong availability in Shopify schema?

Edit your theme code in Online Store > Themes > Edit code and find the availability line. Replace any fixed value with a condition on product.selected_or_first_available_variant.available. Also turn off duplicate schema from apps.

How long does Google take to update availability after I fix it?

It depends on how often Google recrawls the page, so it can take days or weeks. You can request indexing in Search Console's URL Inspection tool for important pages. Merchant Center feeds, if you use them, can also affect what is shown.

Does FunnelGuard detect wrong schema availability?

No. FunnelGuard does not check schema availability yet; it is a possible future check. It does monitor your real customer journeys and tracking, so it can alert you when a page step breaks.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.