Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Out-of-stock product pages returning 404: how to fix it

SEO-069Medium impactOther toolBy FunnelGuardPublished Updated
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.

What happens when a sold-out product returns 404
  1. Search result or adVisitor clicks the product link
  2. Product URLReturns 404 Not Found
  3. AlternativesNever shown
  4. Restock sign-upNever offered
  5. PurchaseGoes to a competitor

The visitor arrives with intent, then hits an error page and the rest of the journey is lost.

Visitors reaching a sold-out product URLExample numbers
Visitors reaching a sold-out product URL (example)Page returns 404 (stay in shop): 120 visitors per month; Page kept with alternatives: 540 visitors per month; 301 to close match: 480 visitors per month0207414120540480Page returns 404 (sta…Page kept with altern…301 to close matchvisitors per month

Example: 1,000 monthly visitors land on a sold-out product URL. Numbers are illustrative only.

How to check if your site has it

Find sold-out and expired pages that return 404
  1. Open Google Search Console

    Go to Indexing > Pages and open the 'Not found (404)' reason. Look for product URLs in the list.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

Check the status code of a product URLbash
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/products/sold-out-item

How to fix it

Decide what the product's status is first. The right response depends on it.

What to do with each kind of unavailable product
SituationBest responseStatus code
Out of stock, coming backKeep page live, show 'Out of stock', offer restock alert and alternatives200
Seasonal or recurring productKeep page live, update it when it returns200
Permanently discontinued, close replacement existsRedirect to the replacement or its category301
Permanently discontinued, nothing relevantRemove with a helpful error page410 or 404
Expired event or offer with a repeat dateKeep page, mark as ended, link to the next date200
Keep or redirect sold-out products by platform
  1. 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.

  2. Redirect discontinued items

    Go to Online Store > Navigation > View URL Redirects > Create URL redirect. Enter the old product path and the new target.

  3. 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.

Product structured data for an out-of-stock pagejson
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Example product",
  "offers": {
    "@type": "Offer",
    "price": "49.00",
    "priceCurrency": "USD",
    "availability": "https://schema.org/OutOfStock"
  }
}
Apache: 301 redirect a discontinued producthtaccess
Redirect 301 /products/old-item /products/new-item
Make the live out-of-stock page useful
  1. Say clearly it is unavailable

    Replace the buy button with a visible 'Out of stock' message and, if known, the expected return date.

  2. Offer a restock alert

    Add an email sign-up so you capture the lead instead of losing the visitor.

  3. Link to alternatives

    Show similar products or the parent category above the fold.

  4. Keep it in the sitemap

    Leave temporarily unavailable products in your XML sitemap so crawlers keep seeing them.

Sold-out product handling

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

Confirmation checklist
  • 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

Prevention habits
  • 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.

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.