// blog / woocommerce

How I handle out-of-stock and discontinued products in a store

Out of stock products SEO has one rule for items coming back: keep the page live and indexed with its availability marked out of stock, because it'll sell again. A discontinued product is different: it gets a 301 to its closest replacement, a page pointing to alternatives if it still earns traffic, or a 410.

By Muhammad Younus Updated 10 min read WooCommerce

WooCommerce and store SEO: illustration for "Out-of-stock and discontinued products"
// 01 - out of stock

Should out-of-stock products stay indexed for SEO?

Yes, if the product's coming back. A page that's out of stock for a few weeks has the same URL, the same links pointing at it and the same search history it had last month. Pulling it from the index throws all of that away to solve a problem that fixes itself when the delivery arrives. Stock status is one of the first decisions I check on a WooCommerce catalogue, and this one's the easiest.

The mistakes I look for are the quick fixes that feel tidy. Setting the product back to draft turns its URL into a 404 for every visitor who isn't logged in. Adding noindex asks Google to drop it. Redirecting it to its category sends the shopper somewhere they didn't ask to go, and the redirect has to be undone the day stock returns.

How do you hide out-of-stock products in WooCommerce? Tick Hide out of stock items from the catalog under WooCommerce, Settings, Products, Inventory. It's a catalogue setting, not an indexing one: WooCommerce's docs say it hides out of stock items from the store catalogue and customer view. I still check what the product URL returns and whether it's in the sitemap, a line on the checklist I run on WooCommerce stores.

The status each situation gets, and the availability value that goes with it
SituationWhat the URL doesAvailability value
Out of stock, coming backStays live and indexedOutOfStock
Taking orders to ship laterStays live and indexedBackOrder
Not released yet, taking ordersStays live and indexedPreOrder
Gone for good, with a true successor301 to the successorNone, the old page is gone
Gone for good, still earning clicks, no successorStays live as a page pointing to alternativesDiscontinued
Gone for good, no clicks, links or successorReturns a 410None
// 02 - the page

How do I keep out-of-stock products useful for shoppers and SEO?

A page worth keeping has to earn its place while it can't sell. These are the five things I set up on every out-of-stock product that's coming back.

  1. i.

    Say it plainly, with a date only if you know it

    The page says it's out of stock beside the price and button, gives a back date only when the supplier's confirmed one, and links the nearest in-stock alternatives.

  2. ii.

    What if only one variation is out of stock?

    Keep the parent product live and mark just that variation out of stock. WooCommerce's variable product docs say the parent stays visible on shop and category pages as long as at least one variation is in stock, and with the hide setting on, sold-out variations drop out of the dropdown.

  3. iii.

    Offer a back-in-stock alert or a pre-order

    A notify-me form turns a dead end into a list of buyers, and a pre-order keeps the sale if you know the arrival date. A pre-order product's availability should then read PreOrder or BackOrder, not OutOfStock.

  4. iv.

    Sort sold-out items to the end of category grids

    The product stays in the category, so its internal links survive, but shoppers see what they can buy first. I do this with the sorting the store already has, or a small snippet, rather than hiding the item.

  5. v.

    Keep Merchant Center in step with the page

    Google's Merchant Center help says availability is required for all products and should always match the website, across the product data, the landing page and checkout. Its automatic item updates feature uses the landing page status to correct the feed when stock moves faster than the feed does.

// 03 - the markup

How do I mark availability in the page and the markup?

Google's product documentation sends you to its merchant listing guide for availability, and that guide lists the values it accepts: BackOrder, Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, PreSale and SoldOut. Availability is a recommended property, not a required one, and Google says not to give more than one value.

On a WooCommerce store you usually don't write this by hand. WooCommerce core builds the Product markup itself, and its code maps stock status three ways: in stock becomes InStock, on backorder becomes BackOrder, and anything else becomes OutOfStock. There's no branch for Discontinued, so a product you've stopped selling for good still tells Google it's only out of stock, unless an SEO plugin or custom code prints a different value.

My check is three things lining up on the live page: the stock message a shopper reads, the availability value in the rendered source, and the button. If the page says Out of stock while the markup still says InStock, that's the one I fix first. A cached copy or a second plugin's schema can lag behind the stock change, so I read the JSON-LD in the page source rather than trusting a settings screen.

// pro tip

Availability is a fact about the offer, not a setting to keep a page looking healthy. Leaving an unavailable product marked InStock doesn't protect anything. It just means the shopper finds out at the cart instead of in the results.

Rather have me do this? One person, whole job.

Book a call on Upwork
// 04 - discontinued

What do I do with a product that's gone for good?

Discontinued products don't get one rule for the whole catalogue. I take each one down this ladder and stop at the first step that fits.

  1. Step 01

    Check what the URL still earns

    Clicks and impressions over 12 months in Search Console, links from other sites in a backlink export, and internal links from posts and other products. A URL with none of these has nothing to protect. One with any of them doesn't go straight to a 410.

  2. Step 02

    301 to a true successor when there is one

    The newer model, the same product under a new name, or the version that replaced it. The test is simple: would the person who searched for the old product be glad to land there? If so, it's a 301, and Google treats a permanent redirect as a signal that the target should be the canonical page.

  3. Step 03

    301 to the closest category only when it matches

    When there's no single successor but the product type still exists, the category that sells that exact type is fair. A discontinued ceramic mug can go to the ceramic mugs category, never the homepage or the shop page.

  4. Step 04

    Keep a discontinued page when it still earns search traffic

    Some products are still searched by name or part number long after they've gone. For those I keep the URL live, mark it Discontinued, remove the add to cart button, lead with the nearest alternatives, and keep the specs people came for.

  5. Step 05

    Return a 410 when there's nothing left

    No clicks, no links, no successor. Google doesn't index URLs that return a 4xx code and removes ones already indexed, so a 410 takes the product out cleanly. When a catalogue has hundreds of these, it becomes a content audit that decides prune, merge or keep for every product, rather than a one-off.

  6. Step 06

    Clean up after the decision

    The old URL comes out of the sitemap, menus, related product blocks and internal links. Then I crawl the store again to catch chains, where one old product redirects to another that's since been removed.

// watch out

Don't noindex a discontinued product and leave it there for good. It stays crawlable, it keeps showing up in internal links, and anyone arriving from an old link still hits a page that sells nothing. Give it a destination or a status instead.

// 05 - the shortcut

Why not redirect everything to the shop page?

Because Google says not to. Its site move guidance warns against redirecting many old URLs to one irrelevant destination, such as the home page, because it can confuse users and might be treated as a soft 404. On a store, the shop page is that homepage: it's related to every product and a match for none of them.

A soft 404 is Google deciding a page that answered with a success code is really a missing page. So the blanket redirect gets you a 404's outcome plus a confused shopper, and hides which products were removed behind one destination.

Mapping each old URL to its closest real page is what worked on a WooCommerce store whose daily clicks fell from 162 to 49 after a redesign. That drop was caused by renamed URLs rather than stock, but the principle carries over: a sapphire category went to the new sapphire category, not the homepage.

Watch for the plugin setting that sends every 404 to the homepage, too. It doesn't remove the dead end. It just moves it from Search Console's Not found list into Soft 404, where it's harder to fix one product at a time.

// 06 - search console

How do I find discontinued products still getting traffic?

I start from the catalogue, not from Search Console. The store export tells me which products are out of stock and which are discontinued, however the store marks that. Then I match those URLs against the Performance report by page over 12 months, because a seasonal product can look dead in a three month window and still sell every December.

Search Console truncates a report export to 1,000 rows, so a large catalogue needs the API, the BigQuery link or the bulk data export instead. It's the same page-level export I build a platform move's redirect map from, and for the same reason: it shows which URLs have earned something.

What each signal on a discontinued product tells me, and what I do about it
SignalWhat it meansWhat I do
Clicks in the last 12 monthsPeople still search for it and clickA 301 to a successor, or a discontinued page with alternatives
Impressions but no clicksIt still ranks but doesn't earnA 301 if a successor exists, otherwise usually a 410
Links from other sites, no clicksLink value with no search demandA 301 to the closest real match
No clicks, impressions or linksNothing to protectA 410, and it leaves the sitemap
Listed as Soft 404 in Page indexingGoogle already reads it as emptyGive it a real status: 301, a useful page or 410

After the changes go live, the Page indexing report shows how they landed: old product URLs listed as Page with redirect is what a 301 should produce. I don't promise a date for any of it to settle. What I watch for is a product URL that lost its clicks without any new URL picking them up, which usually means a redirect pointing somewhere the shopper didn't want to go.

// when to hand this over

If your catalogue has hundreds of out-of-stock and discontinued products and you'd rather one person made the call on each, that's part of the store work I do. Every decision comes with the data behind it, so you can check it yourself.

Book a call on Upwork

Is this your site? Send me the URL.

Book a call on Upwork
// questions - woocommerce

What else do people ask about this?

Should I noindex out-of-stock products?

No, not if they're coming back. Noindex asks Google to drop a page that'll be worth ranking again in a few weeks. Keep it indexed, mark it out of stock, and point shoppers to something they can buy meanwhile.

Is a 404 or a 410 better for a discontinued product?

For Google there's no real gap: it treats every 4xx code except 429 the same way and doesn't index any of them. I still use a 410, because it tells whoever looks at the store next that the product was removed on purpose.

Does WooCommerce mark discontinued products in its schema?

Not in core. WooCommerce maps stock status to InStock, BackOrder or OutOfStock, so a discontinued product reads as OutOfStock unless an SEO plugin or custom code prints Discontinued. I check the rendered source to see which value actually ships.

Should a limited-run product use the unavailable_after tag?

Only when you know the exact end date and won't sell it again. Google's robots meta documentation says unavailable_after means don't show the page in search results after that date. For anything that might come back, I leave it out.

How long should a redirect from a discontinued product stay in place?

For as long as the old URL has links or searches pointing at it. A redirect costs next to nothing to keep; removing it turns a working path back into a dead end.

// sources - checked

Where do these rules come from?

Platform and Google documentation, opened and read on the day this was written. Everything else is how I work.

  1. Google Search Central: product structured data
  2. Google Search Central: merchant listing structured data, availability
  3. WooCommerce source: class-wc-structured-data.php
  4. WooCommerce documentation: products settings, inventory
  5. WooCommerce documentation: variable products, out-of-stock variations
  6. Google crawler documentation: how HTTP status codes affect Google's crawlers
  7. Google Search Central: redirects and Google Search
  8. Google Search Central: site moves with URL changes
  9. Search Console Help: Page indexing report
  10. Search Console Help: export data directly from a report
  11. Google Merchant Center Help: availability [availability]
  12. Google Search Central: robots meta tag, unavailable_after
Muhammad Younus, WordPress technical SEO consultant
// who wrote this

One consultant, writing down his own method

I'm Muhammad Younus, a WordPress technical SEO consultant with 8+ years of experience and 100+ client sites fixed. Top Rated Plus on Upwork with a 100% Job Success Score. Every post here is the way I actually do the job, written in the first person because it's one person doing it, remotely, with no team behind the name.

Nothing in these posts is a client I can't name or a number I can't show. Where a figure comes from a client's Search Console, it's from a published case study, and where a rule comes from Google or a platform, the source is linked at the bottom of the post.

// the service behind this post
Muhammad Younus laughing, a wide genuine smile
// next step

Want this done on your own site?

Book a call on Upwork, send the URL and read-only Search Console access, and you'll get a written scope for the search side before any work starts. One person does the whole job, remotely.

Book a call on Upwork