How can I effectively redirect product collection URLs on my site?

How can I effectively redirect product collection URLs on my site?

jbshopdev
Tourist
5 0 1

Hi guys,

 

We've got two types of urls being indexed on Google:

 

/products/example-product-handle

and

/collections/all/products/example-product-handle

 

We resolved the second URL by removing the within: collection from liquid, fine, but Google are still indexing those urls?

 

I tried to add a redirect in the admin, e.g.

 

Redirect From /collections/all/products/example-product-handle

Redirect To /products/example-product-handle

 

But it's not working as example-product-handle is a valid product / active product still?

 

Is there any easy way to 301 redirect all these types of urls?

 

Many thanks,

Jorge

 

Replies 2 (2)

Jason
Shopify Partner
11207 226 2319

You can only redirect something when the url 404s. Since those urls work the redirection won't trigger.

 

Does your theme not have canonical urls in place? Care to share a link to a product on your shop that you're concerned about?

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
jbshopdev
Tourist
5 0 1

Hey! AH man, that's unfortunate - we have canonicals in place that are to the correct product url, but Google are flagging it as an issue as canonical doesn't match the parent url