On this page
What this issue is
A 404 status code tells browsers and search engines that a page does not exist. Some shops and plugins return a 404 as soon as a product is out of stock, unpublished, or past an end date. Seasonal offers, event tickets and limited runs are common cases.
The page may have had search rankings, backlinks, ad traffic and saved bookmarks. A 404 treats all of that as gone, even when the product is coming back next week.
Why it costs you leads or sales
Google drops 404 pages from its index over time, so the rankings and the organic traffic they brought go with them. Links from other sites point at an error page, so their value is wasted. Visitors from ads, emails and bookmarks land on a dead end and leave.
If the product returns, the page has to earn its position again from scratch. A live page with alternatives can keep the visitor in your shop and capture an email address for a restock alert.
- Search result or adVisitor clicks the product link
- Product URLReturns 404 Not Found
- AlternativesNever shown
- Restock sign-upNever offered
- PurchaseGoes to a competitor
The visitor arrives with intent, then hits an error page and the rest of the journey is lost.
Example: 1,000 monthly visitors land on a sold-out product URL. Numbers are illustrative only.
How to check if your site has it
Open Google Search Console
Go to Indexing > Pages and open the 'Not found (404)' reason. Look for product URLs in the list.
Compare with your catalogue
Export products that are out of stock, draft or expired from your store admin and match them against the 404 URLs.
Test a sold-out URL directly
Open the URL in a browser, then check the status code in DevTools > Network (the first request), or run the curl command below.
Crawl the site
Use a crawler such as Screaming Frog to list URLs with a 404 status that used to be products, including those linked from old sitemaps.
Check backlinks and landing pages
In your analytics, look at landing pages with traffic that now show 404. Those are the ones costing you most.
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/products/sold-out-itemHow to fix it
Decide what the product's status is first. The right response depends on it.
| Situation | Best response | Status code |
|---|---|---|
| Out of stock, coming back | Keep page live, show 'Out of stock', offer restock alert and alternatives | 200 |
| Seasonal or recurring product | Keep page live, update it when it returns | 200 |
| Permanently discontinued, close replacement exists | Redirect to the replacement or its category | 301 |
| Permanently discontinued, nothing relevant | Remove with a helpful error page | 410 or 404 |
| Expired event or offer with a repeat date | Keep page, mark as ended, link to the next date | 200 |
Keep the product active
Leave the product status as Active with inventory at 0. Do not switch it to Draft or Archived, which makes the URL return 404. Turn off 'Continue selling when out of stock' unless you take backorders.
Redirect discontinued items
Go to Online Store > Navigation > View URL Redirects > Create URL redirect. Enter the old product path and the new target.
Add a restock option
Show an out-of-stock message and a back-in-stock email form. Many themes or apps offer this; check your theme settings.
Set stock status, not draft
In WooCommerce, edit the product and set Inventory > Stock status to 'Out of stock'. Avoid moving it to Draft or Trash.
Check the visibility setting
Under WooCommerce > Settings > Products > Inventory, 'Out of stock visibility' hides products from catalogue listings only. The page itself stays live.
Redirect discontinued products
Use a redirect plugin such as Redirection, or your SEO plugin's redirect manager, to send the old URL to a replacement with a 301.
Keep the CMS item published
Do not archive or delete the CMS item or Ecommerce product. Add an 'Out of stock' label with conditional visibility.
Add a 301 redirect
Go to Project settings > Hosting > 301 redirects and add the old path and the new path.
Keep the product visible
In Store Products, set inventory to 'Out of stock' rather than hiding the product, so the page stays live.
Redirect discontinued products
Go to Marketing & SEO > SEO Tools > URL Redirect Manager and add a redirect from the old URL to the new one.
Keep the product page live
Leave the product visible with stock set to 0 so it displays 'Sold out'. Avoid setting it to Hidden or deleting it.
Add a redirect
Go to Settings > Developer Tools > URL Mappings and add a line in the format /old-product -> /new-product 301.
Return 200 for temporarily unavailable products
Render the product template with an out-of-stock state and mark it up with schema.org availability OutOfStock.
Return 301 or 410 for retired products
Map retired products to a replacement with a 301, or return 410 Gone when there is none.
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example product",
"offers": {
"@type": "Offer",
"price": "49.00",
"priceCurrency": "USD",
"availability": "https://schema.org/OutOfStock"
}
}Redirect 301 /products/old-item /products/new-itemSay clearly it is unavailable
Replace the buy button with a visible 'Out of stock' message and, if known, the expected return date.
Offer a restock alert
Add an email sign-up so you capture the lead instead of losing the visitor.
Link to alternatives
Show similar products or the parent category above the fold.
Keep it in the sitemap
Leave temporarily unavailable products in your XML sitemap so crawlers keep seeing them.
Before
- Page returns 404 as soon as stock hits zero
- Rankings and backlinks are wasted
- Visitors see an error and leave
After
- Page stays live with a clear out-of-stock message
- Restock sign-up and alternatives shown
- Discontinued items 301 to a close match
How to confirm it's fixed
- Temporarily sold-out product URLs return 200 and show an out-of-stock message
- Discontinued product URLs return a single 301 to a relevant page
- No redirect chains or loops (test with curl -I -L)
- Search Console URL Inspection shows the live page as available to Google
- The 404 count for product URLs in Search Console falls over the following weeks
- Restock form works and sends a test sign-up to your email tool
How to prevent it happening again
- Write a product lifecycle rule: out of stock = keep, discontinued = redirect, no match = 410 or 404
- Train the team never to set a product to Draft or Trash just because it sold out
- Review Search Console's 404 report monthly for product URLs
- Check apps and plugins that auto-unpublish expired or zero-stock products
- Run a crawl after each big catalogue import or cleanup
How FunnelGuard handles this
FunnelGuard does not check for this yet. Detecting sold-out or expired product pages that return 404 is a possible future check, not a current feature.
What FunnelGuard does today is run your real customer journeys, such as lead forms, checkouts and booking buttons, on a schedule and check each step. If a journey you monitor passes through a product page that stops loading, that failure shows up as a broken step. It does not scan your catalogue for out-of-stock pages.
Questions people ask
Should out-of-stock product pages return a 404?
No, not if the product is likely to return. Keep the page live with a 200 status, a clear out-of-stock message and alternatives. Use a 301 redirect or 410 only when the product is gone for good.
What should I do with a discontinued product page for SEO?
If a close replacement exists, 301 redirect the page to it. If not, redirect to the most relevant category, or return 410 or 404 when there is no sensible destination. Avoid redirecting everything to the homepage.
Does a 404 on a product page hurt my rankings?
The 404 page itself drops out of Google's index, so its rankings and the value of its backlinks are lost. A few 404s do not penalise the rest of your site, but removing pages that earn traffic costs you visibility.
Why is my out-of-stock product showing a 404 in Shopify?
The product is probably set to Draft or Archived, or deleted. Set it back to Active with inventory at 0 to keep the page live, or add a URL redirect under Online Store > Navigation if it is discontinued.
How do I stop WooCommerce returning 404 for out-of-stock products?
Set the product's Stock status to 'Out of stock' and keep it published. Do not move it to Draft or Trash, and check that no plugin unpublishes products at zero stock.
Should I use schema markup on out-of-stock products?
Yes. Keep the Product schema and set the offer availability to https://schema.org/OutOfStock so search engines understand the page is still valid but unavailable.
When should I use 410 instead of 404 for a removed product?
Use 410 Gone when you have deliberately and permanently removed a product and there is no replacement. It signals the removal is intentional. A 404 is fine when you are unsure or the page may return.
Does FunnelGuard detect out-of-stock pages that return 404?
Not yet. It is a possible future check. For now, use Google Search Console's 404 report and a regular site crawl to catch these pages.
Related issues
- SEO-066Money page returns 4xx or 5xxFix guide
- SEO-068Soft 404: error or empty page returned with 200Fix guide
- SEO-070Internal links to 404 pagesFix guide
- SEO-073410 vs 404 misuse for permanently removed contentFix guide
- SEO-076Custom 404 page missing or with no navigationFix guide
- SEO-077404 page returns 200 status (soft 404)Fix guide