Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Rest API Redirects for partial url match

Rest API Redirects for partial url match

radioact
Visitor
3 0 0

Is there any way of creating one redirect that will work not only for https://some-store.myshopify.com/products/adidas-classic-backpack
but also for https://some-store.myshopify.com/collections/nc-xxx1622/products/adidas-classic-backpack  (ie for product links from collection pages)
We are creating redirects for unpublished products and send site visitor to site Home. This is for SEO reasons.

Reply 1 (1)

demib
Shopify Partner
135 13 64

No, even if you had server access it would be difficult to make a rule to match that sort of patterns - and with Shopify you don't.

But why would you make such redirects - when product is unpublished? I can't see any valid SEO reasons for this. For SEO as well as conversions it's better either to change the content - and explain to users why the product is no longer available (this preserves your rankings) or redirect to a matching alternative. 

SEO Geek since 1996, consultant author and public speaker. Admin of the Shopify SEO Facebook Group

Was your question answered? Kindly mark it as an Accepted Solution 🙂