Smart Delete

Deleting a product or collection can have issues for your store management, user experience and SEO. Power Tools Smart Delete helps to alleviate these issues by first hiding a product, and creating a redirect back to a page of your choice.

This helps prevents the user and search engine unfriendly 404 error message from showing, while also allowing you to undelete the product or collection.

After a set period of time the product and redirect will be deleted. You can even set these time periods to be different or even indefinite.

Products

To Smart Delete a product go to the product list page, which should list all products. You should see an option for Smart Delete. Clicking that link will open a window asking for the time to hide before deleting, the redirect URL, and the time the redirect should be active for.

Smart Delete Product

Collections

To Smart Delete a collection go to the collection list page, which should list all collections. You should see an option for Smart Delete. Clicking that link will open a window asking for the time to hide before deleting, the redirect URL, and the time the redirect should be active for.

Smart Delete Collection

Undelete

To restore a product or collection simply un-hide it, once the next store update runs (hourly) the redirect will be removed and the item will no longer be scheduled for deletion.


Limitations

SEO

Shopify creates a large number of URLs that point to the same product, such as:

  • /products/product-handle-123
  • /collections/collection-handle-321/products/product-handle-123
  • /collections/collection-handle-456/products/product-handle-123
  • /collections/collection-handle-789/products/product-handle-123

Resulting one URL per collection that the product is in, plus the canonical URL. The canonical URL is the primary url that is defined for that resource.

Smart Delete will only set up a redirect for the canoncial URL. In order to tell search engines that the these additional URLs are for the same resource ensure that you have a canonical tag defined for that page.

<link rel="canonical" href="{{ canonical_url }}" />

This should appear in your <head></head>, which is defined in your theme.liquid file.

Not to worry however, all themes should have this in place already, however if you are having issues please check this first.