Out-Of-Stock Products On Shopify: Why They Show First And How To Fix Your Collection Sorting

Published:
August 12, 2026

Shopify does not offer a native collection sort that places sold-out products last. To keep out-of-stock products visible without leaving them above buyable products, merchants need an inventory-aware process outside the theme, such as manual ordering, automated collection management, or an app that updates collection positions through the Admin API.

Quick Decision Framework

  • Who This Is For: Shopify merchants with collections that use Best selling, Newest, Price, or another native sort and regularly experience stockouts.
  • Skip If: Your catalog is small, inventory rarely changes, or you deliberately remove every sold-out product from storefront collections.
  • Key Benefit: Keep buyable products visible first while preserving sold-out product URLs and collection visibility when a restock is expected.
  • What You’ll Need: Access to your top collections, inventory settings, collection rules, theme behavior, and a clear discontinued-versus-restocking policy.
  • Time to Complete: 9-minute read, then 20 minutes to audit your three highest-traffic collections.

Best selling is supposed to put your winners first. Without inventory awareness, it can turn your most valuable collection slots into the most visible dead ends.

What You’ll Learn

  • Why Shopify’s native collection sort orders do not evaluate product inventory availability
  • How Best selling can keep high-demand but sold-out products above products shoppers can buy
  • What manual sorting, Liquid changes, and automated collection rules each solve and miss
  • How to choose a stockout strategy based on restock timing, collection size, and SEO priorities
  • What to audit before paying for an app or changing your theme code

Open your best-selling collection right now and look at the very first row. On many Shopify stores, at least one of those top products is out of stock. Not buried on page four where nobody looks. It’s in the first spot a shopper sees, and the first thing Google reads.

That’s not a theme bug or a caching glitch. It’s exactly how Shopify’s collection sorting is built to work. And the frustrating part: the better a product sells, the more likely it is to be the sold-out tile sitting up top.

This piece covers:

  • Why none of Shopify’s sort orders know a product is sold out
  • The “best selling” trap that promotes your most popular dead ends
  • What it costs you, in conversions and in SEO
  • The three common fixes, and exactly where each one breaks

Why Shopify Sorting Ignores Out-Of-Stock Products On Shopify

Every collection uses one of a handful of sort orders: Manual, Best selling, Most relevant, Product title (A-Z or Z-A), Price (high or low), and Date created (newest or oldest).

Read that list again and notice what’s missing. There’s no “in stock first” option. Not one of them looks at inventory. A sold-out item sits in the same slot it would hold if it had 500 units in the warehouse.

You can confirm this in Shopify’s own collection sort-order documentation: availability isn’t a factor in any of them. That single fact is the root of everything below.

The “Best Selling” Trap

This is where it gets ironic. “Best selling” is the most popular sort order on Shopify, because on paper it does what you want: put your winners first.

But “best selling” ranks products by how much they’ve sold (order count). It has no idea whether those winners are still buyable. So watch what happens:

  1. A product sells like crazy.
  2. Selling like crazy is what drives it out of stock.
  3. Because it sold so well, “best selling” keeps it near the top.
  4. Your single most valuable spot on the page now shows something nobody can buy.

The better a product performs, the harder Shopify promotes its own “Sold out” badge. Your strongest sellers quietly become your most visible dead ends.

The other sorts break the same way. “Newest” strands a hyped launch up top the second it sells through. “Lowest price” pushes your cheapest item (often your fastest seller) to the front, stock or no stock.

What It Actually Costs You

Two bills come due. Most merchants only ever notice the first one.

Conversion. A shopper who hits a wall of greyed-out tiles doesn’t make a note to come back later. They decide the whole collection looks picked-over, and they leave. Those sold-out items at the top act like a filter that removes your highest-intent visitor/s: the exact people you paid to get there.

SEO and discovery. This is the invisible bill. Crawlers, and now AI shopping assistants, read your collection page top to bottom. If the first thing they parse is a run of sold-out products, that’s the signal they take about the page’s quality. You spent /months perfecting your product pages. The collection page above them is quietly undercutting the whole funnel.

Want the SEO side in depth? Fastlane’s own Shopify collection page SEO guide covers how these pages earn (and lose) rankings.

The Three Fixes (And Where Each One Breaks)

Fix 1: Drag Sold-Out Items To The Bottom By Hand

The obvious move. Switch to Manual sort and drag the dead tiles down.

Where it breaks: two places. First, manual sorting only works on manual collections. If you use automated (smart) collections, you can’t drag at all, and most stores end up on smart collections once they scale, because membership is rule-based. Second, inv/entory changes hourly and your sorting doesn’t. You’d be re-dragging tiles across every collection, forever, always one sale behind. It’s not a fix. It’s a part-time job.

Fix 2: Re-Sort Products In Your Theme’s Liquid Code

The developer instinct: edit the collection template to loop through products, split the in-stock ones from the sold-out ones, and show available first. It feels right. It’s also the deepest trap.

Where it breaks: pagination. Shopify renders collections server-side and paginates them, like `{% paginate collection.products by 24 %}`. Inside that loop, Liquid only sees the current page’s slice of products, never the whole coll/ection.

So when you re-sort in Liquid, you’re only reordering the 24 products already on the page. A sold-out item the server put on page 1 stays on page 1. You can nudge it to the bottom of that page, but you can’t move it to page 5, because page 5 isn’t loaded on that request. You get tidier-looking pages while the real problem survives. And like every theme edit, it vanishes the next time you update your theme.

Fix 3: Auto-Hide Out-Of-Stock Products With A Collection Condition

The other native lever: make the collection automated and add the condition “Inventory stock is greater than 0.” Now sold-out products drop out of the collection and come back when restocked.

This works, and sometimes it’s the right call. But understand the trade-off: hiding isn’t sorting. You fixed the top-of-page problem by deleting the product from the browse experience, and that has costs:

  • The product disappears from category navigation, so shoppers can’t find a soon-to-restock item they’d happily waitlist.
  • If that collection was the product’s main source of internal links, the page turns into an orphan. Still live, but weakly linked, which is how rankings slide during a long stockout.
  • A routine two-day stockout now triggers a full remove-and-re-add cycle on the page.

Hiding makes sense for products you’ve discontinued for good. As your default strategy, it means amputating pages you actually want to keep.

A Quick Example, With Real Numbers

Picture a collection with 60 products. A flash sale just cleared out 12 of them. Sorted by “best selling,” maybe 5 of those 12 sit in your first two rows.

That’s roughly 40% of a shopper’s first impression showing “Sold out.” Hide them with a condition and the collection shrinks to 48 products, and 5 pages you were relying on for internal links go quiet. Neither option is free. You’re picking which cost to pay. You just usually pick it by accident.

What “Good” Looks Like

Strip away the tactics and the goal is simple to state. Sold-out products should fall to the bottom of the collection automatically, keep their page and their URL, and jump back to their original spot the moment they restock, with no dragging and no theme edit a future update will wipe.

None of Shopify’s native sort orders can do that, because none of them read inventory. You close the gap one of three ways: eat the manual labor, accept the discovery cost of hiding, or move the availability-aware sorting out of the theme so it survives theme changes and keeps up with stock in real time. For a full breakdown of [how each Shopify sort order handles out-of-stock items](https://push-down-out-of-stock.com/blog/shopify-collection-sorting-guide), that reference walks through every one.

Your Next Step

Don’t rebuild anything yet. Do this first: open your top three collections, sort each one the way your live storefront sorts it, and count the sold-out tiles above the fold.

If that number is zero, you’re fine. Move on. If it’s not, you’ve just found a revenue leak you can measure, on the pages that matter most. Decide, on purpose, which of the three fixes fits your store. The worst choice is the one most stores make by default: doing nothing, and paying the conversion-and-crawl bill on their best collections.

Frequently Asked Questions

Does Shopify have a sort option that puts out-of-stock products last?

No. None of Shopify’s native sort orders factor in inventory. A sold-out product holds its position until you move it manually, edit your theme, hide it with a collection condition, or use an app.

Does the “best selling” sort hide sold-out products?

No. “Best selling” ranks by order count only. A product that sold out precisely because it sold well will often stay near the top with a “Sold out” badge.

Will hiding out-of-stock products hurt my SEO?

It can. Hiding removes the product from that collection’s internal links and browse navigation. For a short stockout on a page you want to keep ranking, that link loss can cost you more than leaving the product visible but sorted to the bottom.

Can I fix this by editing my theme’s Liquid code?

Only partially. Liquid re-sorting works within a single paginated page, so it can’t move a sold-out item from page 1 to the last page of the collection. It also breaks on theme updates.

Should I just delete a sold-out product’s page?

Usually not. If the product is coming back, keep the URL live and move the tile down. Delete or redirect only when the product is gone for good, and use a 301 redirect rather than letting it 404.

About the author

Trofim is the founder of Pushy, a Shopify app that automatically moves sold-out products to the bottom of collection pages and restores their original position on restock. No theme edits, and it respects each collection’s existing sort order. Connect on LinkedIn or X.

FIND US ONLINE

WEEKLY DTC INSIGHTS

TRUSTED BY THOUSANDS

TRUSTED PARTNERS

Shopify Growth Strategies for DTC Brands | Steve Hutt | Former Shopify Merchant Success Manager | 460+ Podcast Episodes | 50K Monthly Downloads

Choose a language