Create a Redirect When a Product Is Deleted

4 min setup
No coding required
Runs automatically

Deleting a product leaves a 404 wherever it was linked or indexed. This workflow creates a URL redirect from the deleted product's page to a collection or your catalog, so shoppers and search engines land somewhere useful.

Shopify logo icon
A product is removed from your store
Look up the deleted product's handle and collection
Continue only if a handle was found
Shopify logo icon
Redirect the old product URL in Shopify

How it works

4 steps to never leave a 404 behind when you delete a product

Shopify logo icon

A product is removed from your store

App connector: Shopify • Time to complete: 1 minute

Runs when a product is deleted.

Look up the deleted product's handle and collection

App connector: Data • Time to complete: 1 minute

Find the stored record for this product ID, saved by a companion workflow on Product Created and Product Updated, to get its handle and main collection handle.

Continue only if a handle was found

App connector: Filter • Time to complete: 1 minute

Stop if there's no stored record for the product.

Shopify logo icon

Redirect the old product URL in Shopify

App connector: Shopify • Time to complete: 1 minute

Create a redirect from /products/<handle> to /collections/<collection handle>, or /collections/all if none was stored.

Trusted by 1,000+ merchants
Logo: Rothy's Logo: Adidas Logo: Allure Logo: GQ Logo: DraftKings Logo: Chubbies Logo: Made In Cookware Logo: MUD/WTR

Ready to never leave a 404 behind when you delete a product

Get setup in 4 minutes.

Use this template →

FAQs

Why does it need a companion workflow?

Shopify's product deletion event only includes the product's ID, not its URL handle, so the handle has to be saved while the product exists.

Can I redirect to a similar product instead?

Yes. Store a replacement product handle in the record and redirect to it.

Does archiving a product need this?

No. Archived products keep their URL. This is only for deleted ones.

Personalize this template

Customize this workflow even further:

Set custom delays
Schedule actions to trigger after a set time period, such as sending follow-up emails 3 days after an event.
Chain multiple actions
Connect several steps together in one workflow, like tagging data, updating records, and notifying your team simultaneously.
Store data in tables
Save order details, customer preferences, or custom metrics in your own database for reference and reporting.
Deploy AI agents for smart decisions
Let AI agents evaluate complex scenarios and choose the right action path based on your defined rules.

You're in good company

"MESA has been a game changer for us. And, if you ever get stuck, their support team is always super helpful."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
PetFriendly

"It's like Zapier but exactly designed for Shopify. I have been able to complete all the workflows that I've needed."

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Zailys

"The MESA team has been amazing at helping us set up our automations. We would highly recommend this app!"

  • Ico star
  • Ico star
  • Ico star
  • Ico star
  • Ico star
Rothy's

never leave a 404 behind when you delete a product

4 min setup • Fully supported if you need help