← All posts

How to push out-of-stock products to the bottom on Shopify

Native Shopify sorting only reorders within a single page, so it cannot keep sold-out products off the first screen of a large collection. The fix is a rule that reads live inventory, demotes anything at zero stock to the bottom of the whole collection, and re-checks on every restock. Set it once and the front row stays shoppable.

You want in-stock products first and sold-out ones last, without paying for a third-party app. It is hard because Shopify only sorts within the same page. So the sold-out items float back up, and a shopper landing on your best collection meets a row of products they cannot buy.

A shopkeeper untangles knotted cords as arrows slide jars and bottles into a row that sorts itself on the table

Why do out-of-stock products show first on Shopify?

Because Shopify's collection sort runs per page, not across the whole collection. It orders the products on the current page, then the next page orders itself, and a sold-out item on page one stays on page one.

The "sort by availability" option in some setups helps right up to the page boundary, then stops. A publisher who covers this put the native gap plainly: "Shopify does not offer an in-built feature that allows for automatically sorting out of stock products at the end of the collection." So the work falls back to you, by hand, and inventory changes every day. A product sells out at 2pm and sits on the first row until you notice.

The enemy is small and specific: the moment a ready shopper sees "Sold out" before they see anything they can add to cart.

What does native Shopify sorting actually do here?

It gives you a handful of collection-level sort orders: featured, best selling, price, date, alphabetical. All useful. None reads stock across the collection and pushes the empty shelves to the back.

One workaround is to drag sold-out products down yourself, which works for about a minute, until the next restock and the next sellout undo it. Tag-and-hide is heavier: tag a product when it sells out, exclude the tag, untag it on restock. Now you run a tagging routine on top of the store, and the moment you forget, the front row breaks.

How does an inventory-aware rule fix it?

A rule watches live stock and acts on it: when a product's inventory hits zero, it moves to the bottom of the collection, and when it restocks, it moves back up. No page boundary, because the rule sees the whole collection at once.

Native sort reorders a page; an inventory rule reorders the collection. The shopper on the first screen sees products they can buy, and the sold-out items are still there, just at the back where browsing demand, not buying demand, finds them.

How do you set up an out-of-stock demote rule in Sledge?

In Sledge Merchandising you add a rule to the collection that says "demote when inventory is zero," choose how far down (bottom of the collection, or below the in-stock products), and apply it. From then on, the rule runs on its own.

Three things make it hold. It reads live inventory, so it reacts the same day a product sells out, not whenever you next log in. It runs across the entire collection, past the page wall that breaks native sort. And it re-evaluates on restock, so a product that comes back in stock climbs back up without you touching it. The same rule type works on your search results, so a sold-out product is not the top hit for its own name either.

You can preview the collection with the rule applied before you publish, so you see the new front row before a shopper does.

Will this hide my sold-out products from shoppers?

Demoting and hiding are not the same thing, and you usually want the first. Demote moves a sold-out product to the bottom; it stays in the collection, still indexed, still a place to capture interest. Hide removes it entirely.

For most stores, demote is right. A sold-out product at the bottom can still carry a "notify me" form and catch demand for the restock, which a hidden product cannot. Sledge lets you choose per rule: demote the sold-out items, or hide them, depending on whether you want the browse value or a fully clean grid. Demote is the default that protects the most sales, because the goal was never to erase the product, only to stop it from being the first thing a buyer sees.

The out-of-stock sorting checklist

  • Identify the collections where sold-out products surface on the first screen.
  • Add a demote rule keyed to live inventory at zero, applied to the whole collection.
  • Choose the landing spot: bottom of the collection, or below all in-stock products.
  • Confirm the rule re-evaluates on restock so returning products climb back up.
  • Apply the same rule to search results so a sold-out item is not its own top hit.
  • Decide demote vs hide per collection; keep demote where a restock alert can capture demand.

Related reading

Merchandising · What is merchandising? · Search · Back in Stock · Shopify broke manual collection sorting. Here's the fix

// FAQ

Questions, answered

Why does Shopify keep showing out-of-stock products first?

Shopify sorts within a single page, not across the whole collection, so a sold-out product on page one stays on page one. Native sort has no order that reads live stock and pushes empty shelves to the back of the entire collection.

Can Shopify automatically move sold-out items to the end of a collection?

Not natively. Publishers who cover this confirm Shopify has no built-in feature to auto-sort out-of-stock products to the end. An inventory-aware rule does it, and re-checks on every restock.

Does demoting sold-out products hurt SEO?

Demoting keeps the product in the collection and indexed; it only changes the order, so it does not remove the page. Hiding removes it, which is why most stores demote rather than hide unless they want the product gone entirely.

What happens when a demoted product restocks?

The rule re-evaluates and the product climbs back into its normal position automatically. You do not re-sort or re-tag anything; the rule reads live inventory and reacts on its own.

Keep the front row shoppable.

Install free. By tomorrow, set one rule and built-in Growth Intelligence shows how much of your collection traffic was meeting sold-out products first, with dollar amounts attached.

14-day free trial · No code · Works with any theme · Uninstalls clean