Out-of-stock products in Shopify: hide, sort, badge or keep selling

A reference for the whole sold-out state in Shopify: what happens by default, every option to hide, sort or label sold-out products, and the SEO cost of each. Includes a decision table for temporary versus discontinued products.

Published · 15 min read

A sold-out product is a page with a job to do, not a problem to hide. How you handle it depends on one question: will the product come back? This guide covers both answers, with exact admin steps and what each choice does to Google. Points marked "check" are still being tested in a dev store.

Short answer: pick by case

CaseProduct pageCollections and searchGoogle
Back within weeksKeep it live. Show a restock date and a way to be told.Move it to the end or leave it. Do not remove it.Keep the URL. Make sure availability says out of stock.
Seasonal, back next yearKeep it live. Say when it returns.Remove it from menus and featured spots.Keep the URL live. Do not redirect.
Maybe back, maybe notKeep it live for now. Set a review date.Sort it low.Decide at the review date.
Gone for good, close replacement existsRedirect (301) to the replacement.Gone from collections.The redirect passes the signal on.
Gone for good, no replacementDelete it and let the URL return 404.Gone.A clean 404 is fine.

The rule behind the table: do not unpublish products that will return. The section "Do not unpublish" explains why.

What Shopify does at zero stock

Take a product with inventory tracking on and "Continue selling when out of stock" off. Shopify Help says an item with zero or less inventory shows as out of stock and cannot be bought.

What the shopper sees comes from your theme, not from the admin. On most current themes you can expect:

  • The Add to cart button turns into a disabled "Sold out" button.
  • A sold-out variant in the picker is marked "Variant sold out or unavailable" in Dawn.
  • Collection cards may show a "Sold out" badge.
  • The product stays in collections, search and the sitemap, unless you change that.

Check these on your own theme, because wording differs. Open a sold-out product in a private browser window.

The theme also controls the availability value in the product's structured data. The Google section below shows how to look at it.

If the box "Continue selling when out of stock" is on, there is no sold-out state at all and the rest of this guide does not apply to that product. The setting is explained in our guide to continuing to sell when out of stock.

One variant sold out, the rest in stock

Most stock-outs hit one size or colour. Inventory is tracked per variant, so a T-shirt can be sold out in Medium and in stock in Large. The page stays buyable and Medium shows as unavailable. The product page opens on the first available variant, so a shopper sees the sold-out size only after selecting it or following a link to it.

You have three choices.

Leave it as it is. The shopper sees Medium greyed out and understands. This is the best default: they learn the size exists.

Hide the sold-out variant. Some themes have a setting for this. Look in Customize, select the product template, then the product information or variant picker block, and read the options. If your theme has no such option, hiding means editing the theme code, which varies by theme. We do not publish one code snippet for all themes, because the wrong edit can break the picker. Ask a developer, or test on a duplicate theme first.

Know the cost of hiding. If the variant disappears, shoppers who wanted Medium do not know it exists. You get no signal that people wanted it.

Also check locations. Shopify Help says that if the location that fulfils online orders is at zero, the item shows as sold out online even when another location has stock. Look under Products > Inventory. If you use Shopify Flow, its "Product variant back in stock" trigger works at variant level and ignores locations. When locations matter, use the "Inventory quantity changed" trigger instead.

Hide sold-out products from collections

This is the most asked-about option. It works through an automated (smart) collection. Shopify Help describes it like this:

  1. Turn on inventory tracking for the products.
  2. Open Products > Collections and the collection you want to change.
  3. Add the condition Inventory stock is greater than 0.
  4. Set Products must match to all conditions.

Products come back into the collection on their own when you restock them.

The trap: Shopify Help warns that this does not work if the collection is set to match any condition. With "any", a product that matches another condition stays in the collection even at zero stock.

Two limits:

  • The "all products" page. The default /collections/all page cannot be filtered directly. Shopify Help says to replace it with your own collection first, then put the stock condition on that collection.
  • Variants. Check how the condition behaves for a product where only one variant is out. We expect it to look at the product as a whole, but this needs a test.

A product that is out of every collection is harder to reach for shoppers and for Google. If it will return, sorting it to the end (next section) gives most of the benefit without cutting the links. Shopify Help also points to inventory apps and to Shopify Flow. Flow holds the biggest trap, covered below.

Hide them from search and filters

Two different places, two different tools. Both live in the free Shopify Search & Discovery app.

Filters. In the app, go to Filters and click Add filter. In the Source field choose Availability. This gives shoppers an in-stock tickbox on collection and search pages. It is better than hiding, because the shopper decides.

Empty values. Under Settings > Filters there is a section called Empty values with Hide, Show at the end and Show in default order. Shopify describes this for filter values in general. It does not hide sold-out products from search.

We did not find a documented Shopify setting that removes out-of-stock products from storefront search results. Look through the settings of whichever search app you use before you promise anyone that, and test a sold-out product in your own storefront search.

Sort sold-out products to the bottom, and label them

Shoppers should see what they can buy first. Sorting is gentler than hiding, because the page stays linked.

The sort options in the admin, from Shopify Help, are: Most relevant, Best selling, Alphabetical, Price, Date created and Manual. None of them is described as stock-based. In practice, Shopify has no built-in "sold out last" sort. We still list this as a check, because Shopify changes admin screens often.

What you can do:

  • Manual sort, by hand. Set the collection to Manual, select products and move them to the end. Fine for 30 products, a chore for 3,000, and the order does not update when something restocks.
  • Theme code. Community answers describe a Liquid approach that splits products into available and sold-out lists. Known problem: the loop sees only the current page of products, so with pagination it cannot move sold-out items to the end of the whole collection.
  • An app. Several apps exist for this exact job. Check how each handles restocks, large collections and uninstall.

For a small catalogue, sort by hand and review monthly. For a large one, use an app or a developer, and make sure you can undo it.

The sold-out badge

A clear label helps more than a grey button. In Dawn the sold-out badge is automatic. Under Customize > Theme settings > Badges you can change its position, corner radius and colour scheme, but you cannot turn it off or reword it. The text comes from the theme's default content ("Sold out"). The badge appears only when every variant is sold out. Other themes differ, so look at the product card settings in yours. Wording matters:

WordingWhen it fits
Sold outGone, no promise either way
Back in MarchYou know the date
Out of stock, notify meYou collect requests
DiscontinuedLast units gone, no restock

Per-variant wording needs code or an app. In Dawn the badge does not show on a product that still has one variant in stock, but check your own theme.

Do not unpublish

Many guides say "hide the product". Many shops do it by unpublishing. This is where the damage happens.

Shopify's URL redirect help states that setting a product to Draft, or removing it from all sales channels, makes its URL return a 404. Take that as the working rule: an unpublished product is a missing page. Staff who preview a draft product in the theme editor can still see it, so check in a private window.

Google's documentation says an indexed URL that starts returning 404 or 410 is dropped from the index over time. So a product unpublished for weeks can lose its place in search, and republishing means starting again.

Now the trap. Shopify Help offers a Flow template called Publish and unpublish products based on inventory level. It also describes a manual workflow: trigger Product variant inventory quantity changed, then the action Unpublish product. Shopify Help says hidden products come back on restock. That part is useful. But Shopify Help does not tell you that every product the workflow unpublishes returns a 404 in the meantime. For a product that comes back in two weeks, you have turned a short stock-out into a dropped page.

The Flow approach is fine for products you will never restock. It is risky for anything with a restock plan, search traffic or backlinks. For temporary stock-outs, sort to the end, add a badge or use a collection condition. They keep the page live.

One more catch. The trigger runs per variant, but Shopify's template checks all variants before unpublishing. It unpublishes the product only when no variant has stock, so one sold-out size alone does not hide the product. A workflow you build yourself must do the same check.

What Google sees

Google's soft 404 documentation defines a soft 404 as a page that tells people it does not exist, or is nearly empty, but returns a success code. Google excludes those pages from results. It does not say that out-of-stock pages are soft 404s. Third-party coverage reports Google's John Mueller saying, in 2021, that out-of-stock pages can end up treated that way, and that there is no fixed time limit. That is a statement by one Google employee, reported second-hand. Treat it as a warning, not a rule.

Real content makes a sold-out page safe: description, photos, specs, restock date, links to alternatives. A disabled button and nothing else looks empty.

Ahrefs gives the split used in the table above: keep temporary stock-outs live with restock features, redirect permanent ones to a similar product, delete when there is no replacement. Yoast and the Search Engine Journal write-up of Mueller's advice agree: for a short outage, keep the page indexable and mark it unavailable.

Structured data

Shopify themes output product markup, and the theme decides the availability value. Google lists the allowed values for an offer: BackOrder, Discontinued, InStock, InStoreOnly, LimitedAvailability, OnlineOnly, OutOfStock, PreOrder, PreSale and SoldOut. Google says availability is recommended, not required, and that you give one value per offer.

To check yours, run a sold-out product through Google's Rich Results Test, or view the page source and search for availability. It should say OutOfStock for a sold-out variant and InStock for the rest. If it says InStock for something you cannot buy, the theme markup is wrong.

Merchant Center and ad feeds

Google's Merchant Center rules are stricter. They say to use out_of_stock for products you cannot sell now, and not to use it for discontinued products: remove those from your data. For items that will return and that you still take orders for, they describe backorder, with a ship date.

If you advertise, stop spend on products you cannot sell, as the agency Digismoothie also advises. Check what your Google and Meta channels do when stock reaches zero. Google's product sync is automatic by default, but confirm the availability of a sold-out product in Merchant Center, and check the settings of your channel apps.

Where to look in Search Console

Open the Page indexing report. Look for Soft 404 and Not found (404). Filter by your product URLs. If a product you plan to restock appears there, put it back live, make sure it has real content, and then inspect the URL. Do this before you plan any redirect.

Discontinued products

A discontinued product has three exits.

Redirect it. Best when a close replacement exists, such as the next model. Shopify's current path: Content > Menus, then View URL Redirects, then Create URL redirect. Fill Redirect from with the old path, for example /products/old-name, and Redirect to with the new path. Redirects take effect at once. Google's documentation says to use a 301 for a page with a clear replacement. Shopify's redirect tool does this for you.

Three limits from Shopify Help matter:

  • A redirect only works for a URL that is broken. If the old product still loads, the redirect does nothing. So first unpublish or delete the old product, then add the redirect.
  • Markets need a test. Shopify Help says a redirect made in the admin covers market subfolders such as /en-ca, and also that some subfolders may need their own redirect. After you create one, open the old URL under each market path.
  • If you hide a collection and later show it again, its redirect is removed. Recreate it if you hide it again.

For many products, use Import on the same page with a CSV.

Choose the target carefully. Send the shopper to the closest match: a replacement product, then the narrowest collection. Ahrefs notes that redirecting to a category page or the homepage, instead of a closely related page, may lead Google to treat the redirect as a soft 404.

Delete it. If there is no good target, let it return 404. Google treats 404 and 410 alike, and Shopify gives you a 404 for a removed product. Then clean up: remove the product from menus, collections, blog posts and featured sections. Do this first, so shoppers do not land on a dead page from your own links.

Keep it live. Worth it when the page has value on its own, such as a manual or steady search traffic. Mark it as discontinued and link to the replacement. Remove it from your Merchant Center feed rather than using out_of_stock.

Make the sold-out page earn something

A sold-out page that is only a dead end loses the visit. Add one of these, in this order of effort.

  1. A restock line. "Expected back in March" if you know. If not, do not invent a date.
  2. Alternatives. A "You may also like" block set to related products, or a hand-picked link to the closest in-stock item.
  3. A way to be told. An email form that appears when the chosen variant is sold out. How to build one is in our guide to the notify me button, and the email that follows is covered in back in stock email examples.
  4. A way to buy now. If you can honestly ship on a known date, the choices are backorder or preorder instead of a sold-out page. The first starts with the setting in our guide on selling when out of stock. Pick this only with a date you can defend. With the setting on, the product has no sold-out state, so a notify-me form has nothing to show.

Where our add-on fits

Back in Stock Alerts is our own Shopify add-on for step 3. It adds an email form as a theme app block that shows only when the selected variant is sold out, and sends an email when you restock. You see who is waiting for which variant, and you can export the list as CSV. Limits, stated plainly: it sends email only (no SMS), it does not connect to Klaviyo yet, and the free plan covers 50 emails a month. The app page has the plans, and the setup help shows the steps. If the form does not show, see troubleshooting. You do not need any app to follow the rest of this guide.

Checklist and FAQ

Checklist

For each sold-out product, answer these in order:

  • Will it return? Write "yes", "no" or "unknown" with a review date.
  • If yes: the product is not unpublished. Check Status is Active and the Online Store channel is ticked.
  • The page shows real content, a clear sold-out state and a restock line.
  • Structured data says OutOfStock (check the source or the Rich Results Test).
  • The product is sorted lower, not removed from every collection.
  • Ad spend and feed entries for it are paused, if you advertise.
  • If it will not return: a 301 redirect to a close match, or a 404, and internal links cleaned.
  • Flow workflows that unpublish products have been reviewed.

FAQ

Does Google penalise out-of-stock products? We found no Google document saying so. Google's soft 404 page does not mention stock. What can happen is that a thin page is treated as an error page and dropped from results. Content and clear markup are the defence.

How long can I keep a sold-out page live? Google gave no time limit, per a 2021 statement by Mueller reported by Search Engine Roundtable. Keep it while return is likely and set a review date.

Should I noindex sold-out pages? Usually not. Ahrefs generally advises against it for temporary stock-outs, because it can interrupt the flow of link value.

A variant looks sold out but I have stock. Why? Check the location. If the location that fulfils online orders is at zero, the item shows as sold out online. Shopify Help describes this case. Also check that inventory tracking and the right location are set on the variant.

My product is back and Google still shows it as out of stock. What now? Make sure the page and the markup now say InStock. Then use the URL Inspection tool in Search Console. Mueller's advice, as reported by Search Engine Journal, was to link restocked products from your homepage so Google rechecks them sooner.

Is a 410 possible in Shopify? We found no documented way. Google treats 404 and 410 the same, so nothing is lost.

Back in Stock Alerts

Collect emails on sold-out variants and send one restock email in waves sized to your stock. Free plan, 0% commission.

See Back in Stock Alerts