Handle out-of-stock product pages

An out-of-stock product page should stay live if the product will return. Keep the URL, show availability clearly, offer an alert and link to alternatives, and update markup to OutOfStock or BackOrder. Remove discontinued items with a 410 and redirect only to a real successor.

highIn codeimpact effort

Why this matters

Keep the URL, tell the truth, offer a path to alternatives.

Get the full breakdown

The extended brief explains when this works, when it does not, and the trade-offs. Join the waitlist and it unlocks for every tip when sign-in opens; MCP access is the paid part.

Join the waitlist

Before you start

  • Inventory status in the product template
  • Access to redirect and status handling

How to apply it

  1. Show availability and keep the URL

    Render a clear out-of-stock message with an email alert and links to in-stock alternatives. Do not delete or noindex the page for a temporary stockout.

    Check: An out-of-stock product returns 200 with an availability message and an alert form.

  2. Align the markup

    Set offers.availability to OutOfStock or BackOrder and keep price present when it is still known. Remove InStock from unavailable items.

    Check: The JSON-LD availability matches the visible status for sampled products.

  3. Retire discontinued items cleanly

    For permanent removals without a successor, drop the URL from the sitemap and return 410. When a successor exists, 301 to it.

    Check: Removed products return 410 after the grace period, and successor redirects resolve in one hop.

Get the prompt for your agent

A ready-to-paste prompt for your agent that implements this tip and verifies the result in your repo.

Join the waitlist

Source: seo-mcp playbook · curated entry · report an error

Framework notes

shopify

Use `product.available` and variant inventory in `sections/main-product.liquid`; emit `OutOfStock` when `selected_or_first_available_variant.available` is false.

nextjs-app

Drive the page and its Product JSON-LD from the same inventory response so a stock change updates both at the next revalidation.

Official references

Let your agent apply this + 161 more tips.

Pre-order — $19