Every WooCommerce catalog accumulates products that stop selling. Some return to stock within days. Others never come back. The problem is that WooCommerce treats both cases almost identically: it gives you instock, outofstock, and onbackorder, and nothing that says "this product is permanently gone." Store owners are then left with a decision that touches three separate systems at once: the customer experience, the crawl and index layer, and the product data that AI systems retrieve and cite.
This guide is written for e-commerce managers, technical SEO specialists, and WooCommerce store owners who need a repeatable rule instead of a case-by-case guess. By the end, you will be able to classify any product into one of four paths (keep, keep with Discontinued schema, 301, or 404/410), implement that decision in WooCommerce, and verify that the resulting signals (HTTP status, structured data, sitemap, robots) are consistent.
One framing point before the steps. The effect of URL hygiene on AI visibility is indirect. Dead, redirected, or mis-signalled product URLs affect crawlability, data consistency, and freshness, which are prerequisites for being retrieved. No published study isolates a causal link between a redirect and an AI recommendation, so treat the AI angle as a hypothesis supported by adjacent evidence, not a proven mechanism.
TL;DR WooCommerce has no native "Discontinued" status, only
instock,outofstock, andonbackorder. Temporarily out-of-stock products should stay live on a 200, remain indexable, and stay in the sitemap. Permanently discontinued products with a clear successor should 301 to that specific replacement product. Discontinued products with no successor should 301 to a genuinely relevant category or return 404/410 and be removed from the sitemap. Product schemaavailabilitymust always match the visible text on the page. Dead URLs cannot be cited by AI systems, which makes them a citation-gap problem rather than a ranking problem.
Out-of-Stock or Discontinued WooCommerce Products: The Core Decision
The first distinction is temporal. "Temporarily out of stock" means the SKU is expected back, whether from a supplier, a production run, or a seasonal cycle. "Permanently discontinued" means the SKU is retired from the assortment. These are not the same problem, and they do not deserve the same technical response.
The second distinction is between hiding and removing. WooCommerce's "Hide out of stock items from the catalog" setting removes products from category and shop listings while leaving the URL accessible. That is a merchandising decision, not a URL decision. The page still exists, still returns 200, and can still be crawled and cited. Hiding is not deleting.
The third distinction is the layer you are optimizing. A URL decision affects user experience (can a visitor still find the product or an alternative?), SEO and crawl behavior (does the URL return a meaningful status code?), and product data for AI systems (does the structured data describe reality?). A decision that fixes one layer while breaking another is not a decision, it is a new problem.
| Mechanism | When to use | When NOT to use | Main risk |
|---|---|---|---|
| Keep (200 OK) | Temporary stockout, seasonal SKU with a stable URL | Product is permanently retired with no unique value | Page reads as "no longer available" and is classified as a soft 404 |
Keep + Discontinued schema |
Retired product kept live for reference, manuals, or accessories | No visible "discontinued" messaging on the page | Schema and visible text mismatch |
| 301 redirect | A clear functional replacement or a tightly related category exists | No relevant target exists | Irrelevant target is treated as a soft 404 |
| 404 / 410 | Permanently removed, no replacement, no useful residual content | Product is only temporarily unavailable | Loses residual link equity and any user path |
Watch out for one structural constraint: WooCommerce core has no native way to mark a product as permanently discontinued while keeping its URL accessible. Any "Discontinued" state you build is a custom layer on top of the three stock statuses.
Before You Decide: Inputs, Assumptions, and When This Guide Doesn't Apply
This method assumes a real catalog, typically hundreds to thousands of SKUs, where manual review per product is impractical. It does not apply to seasonal products that keep one permanent URL year-round (keep those on a 200), and it does not apply to non-product pages such as blog posts or landing pages.
Prepare the following inputs before touching a single product:
- Product export with SKU, stock status, URL, and category.
- 12-month traffic and revenue per URL.
- Backlink profile per URL (at minimum, referring domains count).
- A shortlist of functional replacements for retired SKUs.
- Server or plugin access for redirect management.
- Google Search Console access for indexing and coverage data.
- Product feed access (Google Merchant Center or equivalent).
If you cannot implement server-side redirects or edit JSON-LD output, you need a developer. Plugin-level redirects are acceptable for small volumes, but they must return true 301 status codes, not JavaScript or meta-refresh redirects.
Step 1 — Classify Each Product: Temporary Out-of-Stock vs Discontinued
Classification comes before any action. Segment the export by stock status, then apply two labels to every product.
Temporary vs permanent, using these criteria:
- Date of last sale (a long gap with no restock signal leans permanent).
- Supplier availability and lead time.
- Assortment plan for the next two quarters.
- Whether the product is referenced in active marketing or bundles.
Replacement status:
- Has replacement: a functionally equivalent SKU exists and is in stock.
- No replacement: nothing in the catalog serves the same need.
The control point is strict: every product carries exactly one temporal label and one replacement label. Ambiguity here produces inconsistent redirects later. If you genuinely do not know whether a product will return, treat it as temporary for one review cycle, then reclassify.
Step 2 — Temporarily Out-of-Stock: Keep the URL Live (200)
For products that will return, the URL stays live and indexable. Do not delete, do not 404, and do not remove the URL from the sitemap.
- Keep the page returning 200 OK.
- Set
availabilitytoOutOfStockorBackOrderto match the real state. - Add a visible message with the expected return window.
- Offer an email notification option.
- Keep internal links pointing to the page.
The warning here is specific. Google has confirmed that pages returning 200 OK while displaying "out of stock" or "no longer available" messaging can be classified as soft 404s, and soft 404s continue to be crawled while consuming crawl budget (Google, via Search Engine Journal, July 2025). The mitigation is not to hide the page, but to make it genuinely useful: alternatives, specifications, and a clear restock signal.
Control point: the schema availability value equals the visible text, and InStock never appears when there is no stock.
Step 3 — Discontinued With a Replacement: 301 to the Specific Product
When a retired SKU has a functional successor, redirect to that product, not to the category and not to the homepage.
- Choose the closest functional equivalent, not the closest price point.
- Implement a single 301 (or 308) with no chains.
- Update internal links to point directly at the new URL.
- Remove the old URL from the sitemap.
Google states that 301 and other permanent redirects do not cause a loss in PageRank (Google Search Central, Site Moves and Migrations, updated 2026). Googlebot follows up to 10 hops, but Google advises keeping chains to three or fewer. Redirecting to an irrelevant destination can be treated as a soft 404, which is why the homepage is a poor default.
Control point: one hop, the target returns 200, and the target is topically consistent with the retired product.
Step 4 — Discontinued Without a Replacement: Relevant Category, 404, or 410
When nothing in the catalog replaces the product, you have two valid options.
If a tightly related category exists, 301 to that category. If no sensible destination exists, return 404 or 410 and remove the URL from the sitemap. Never redirect a batch of retired products to the homepage.
Google treats both 404 and 410 as correct responses for permanently removed pages (Google Search Central, Crawl Budget Management, updated 2026). The measurable difference is crawl frequency: in a controlled experiment across 119 test URLs and more than 350,000 data rows over three months, 404 URLs were crawled 49.6% more often than 410 URLs (Reboot Online, 2022, updated 2026). That difference concerns crawl frequency, not ranking, and it does not make 410 universally superior.
Control point: no redirect chains, no soft 404s, and no internal links pointing at dead URLs.
Step 5 — Fix Product Schema and Data Consistency
Structured data is where most catalogs silently break. Valid ItemAvailability values include InStock, OutOfStock, Discontinued, BackOrder, and SoldOut. The value must describe the real state of the product.
- Set the correct
ItemAvailabilityvalue per product. - Confirm the JSON-LD matches the visible page text.
- Check variants: WooCommerce generates structured data at the parent product level by default, so variations with their own SKUs and stock do not get variation-level markup.
- Apply fixes server-side, never through cookies or sessions, because crawlers will not see session-based output.
The documented failure mode is worth memorizing. A store showed "availability": "https://schema.org/OutOfStock" in JSON-LD while the frontend displayed "In Stock." Google surfaced "Out of stock" in results and click-through rate dropped (Freshy, February 2026). Google's own guidance for AI features lists structured data matching visible text as a best practice (Google Search Central, AI Features and Your Website, updated December 2025).
Control point: validate the JSON-LD and compare it line by line against the visible text.
Step 6 — Sitemaps, Feeds, and Crawl Signals
Sitemaps and product feeds are declarations of what is alive. They must not advertise dead URLs.
- Remove 404, 410, and redirected URLs from the sitemap and the product feed.
- Keep only URLs returning 200 with genuine content.
- Add a self-referencing canonical to every kept URL.
- Review robots.txt for AI crawlers. PerplexityBot, which indexes for Perplexity results, respects robots.txt, while Perplexity-User generally ignores it because the fetch is user-triggered; changes can take up to 24 hours to propagate (Perplexity crawler documentation, 2026).
Control point: the sitemap contains only 200 URLs, and any llms.txt file you maintain points exclusively at live resources.
Step 7 — Measure Whether AI Still Cites Your Product Pages
URL hygiene is the input. Citation behavior is the output you actually care about, and it must be measured, not assumed.
- Capture a baseline before making changes.
- Track Citation Rate and Mention Rate for shopping-intent prompts.
- Compare the URLs you own against the URLs AI systems actually cite, which is the citation gap.
- Monitor weekly rather than judging a single response.
This is where Semly fits as the natural next step. Semly integrates with WooCommerce, Shopify, and Google XML feeds to show which SKUs are recommended and cited, using an AI Visibility Score from 0 to 100, Mention Rate versus Citation Rate, Share of Voice, and Sentiment. A free AI visibility report is available at report.semly.ai.
Two facts shape expectations. Being indexed is not the same as being cited: only about half of retrieved URLs appear in the final AI answer (Ahrefs, via Surfer SEO, 2026). And AI systems retrieve from different indexes, with Bing feeding ChatGPT, Brave feeding Claude, Google feeding Gemini, and Perplexity running its own crawler. Only about 11% of cited domains appear across multiple platforms (Whitehat SEO, March 2026).
Control point: Citation Rate holds or improves after catalog cleanup, and no citation gap remains on dead URLs.
Common Mistakes and How to Fix Them
- Blanket redirect to the homepage. Why it hurts: Google may treat it as a soft 404. Fix: redirect to a specific replacement or a relevant category.
- 404 or 410 for temporarily unavailable products. Why it hurts: it destroys accumulated history and backlinks. Fix: keep the URL on a 200 with correct schema.
- Redirect chains. Why it hurts: chains have a negative effect on crawling. Fix: collapse to a single hop.
InStockmarkup with no stock. Why it hurts: it produces a schema and content mismatch and can suppress CTR. Fix: correct the value server-side.- Dead URLs left in the sitemap or feed. Why it hurts: you keep advertising pages that no longer exist. Fix: regenerate both from live URLs only.
- Deleting a product without checking backlinks and order history. Why it hurts: you lose signals you cannot recover. Fix: audit before acting.
- No measurement after changes. Why it hurts: you cannot distinguish improvement from noise. Fix: baseline, then weekly tracking.
What to Do Next
A four-week sequence keeps the work bounded:
- Week 1: audit and classify the catalog.
- Week 2: implement redirects, schema fixes, and sitemap cleanup.
- Week 3: validate status codes, schema, and internal links.
- Week 4: measure Citation Rate and Mention Rate against the baseline.
For a small catalog, manual handling per product is realistic. For a large one, encode the classification rules and apply them with a script, then spot-check the output. If you need per-category or per-tag hiding, redirect rules, or stock thresholds, an out-of-stock management extension is the practical route.
Repeat the audit quarterly and whenever the assortment changes materially. Then verify the outcome where it matters: check whether AI still cites your product pages, including the ones you just retired, with a free report at report.semly.ai.
FAQ
Should I use 404 or 410 for a discontinued product? Both are valid for permanently removed pages. The measured difference is crawl frequency: 404 URLs were crawled 49.6% more often than 410 URLs in a controlled experiment (Reboot Online, 2022, updated 2026). Use 410 when you want the strongest permanent-removal signal, and 404 when you are comfortable with more frequent recrawling.
Can I redirect a discontinued product to its category? Yes, if the category is tightly related to the product. Do not redirect to the homepage or to an unrelated category, because Google may treat an irrelevant destination as a soft 404.
Should discontinued products stay in the sitemap? Only if the URL returns 200 with genuine, useful content. Remove 404, 410, and redirected URLs from the sitemap and the product feed.
How do I measure the AI visibility effect of catalog cleanup? Capture a baseline before changes, then track Citation Rate and Mention Rate for shopping-intent prompts weekly. Semly's feed integrations for WooCommerce, Shopify, and Google XML show which SKUs are cited, and a free report is available at report.semly.ai.