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

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

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?

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