Sorry to hear that you have accidentally deleted the sold out products from your store. I think the first method would be the best take in this situation. If you have deleted the sold out products the links to the products on the online store will lead to a 404 error due to the products no longer being available on the store. You can in fact hide your out-of-stock products by creating a condition on an automatic collection like the one in this image:
With that being said, when the store detects that a product is no longer in stock it will then be removed from the collection. Thus, making it not available on the online store for your customers to view. Alternatively, you can look towards using a third-party application as well to have out-of-stock products hidden on the online store. I put together some recommendations, feel free to check them out:
Thank you Ollie, I’m happy to hear your reply.
OK. That’s the solution, #1.
In my case, I should do it manually because I have products that need to be live in the store with status sold out. Anyway, I will do that.
So there will be no 404 issues in that way because its URL is still live on google, is it right?
With our app, you can set up delist rules for select products or all products to have them unpublished (hidden), deleted or archived. It also supports putting a product in draft mode but we don’t recommend that status for SEO.