Shopify Power Tools has a number of ways to handle sold out products that ensure you users have the best experience and your search engine optismisation is handled correctly.
Hiding Sold Out Items
Using this feature you can automatically hide sold out items from your store.
You also have the option to create a redirect to a page of your choosing, which is useful for SEO and your users.
Removing From Collections
This feature allows you to simply remove the sold out products from any custom collections.
This only works for custom collections and smarter collections.
Move to end
If you have a manual or random sort order collection you can use this to move the sold out products to the end of the collection.
This ensures they they are not easily seen by users or are as readily indexed by search engines.
This feature will automatically delete a variant once its inventory level is less than 1 and it is no longer able to be purchased by the user ('deny').
The last variant will not be deleted, even if it is out of stock - you can use Power Tools other features for handling sold out products.
This feature is particularly useful for managing smart collections which have rules based on variants, or Power Tools own Filter Menu. By deleting old variants smart collection rules will no longer match, and likewise the auto-tagging feature of the Filter Menu will no longer show out of stock options.
For example if you have a variant with title 'Red' the product will no longer match rules for variant title equals 'Red' once it is sold out.