How to link products directly from collection pages for better SEO?

Hey @Mike50 , I think you might be able to do the reverse of what @Tejas_Nadpara said on the first page of this thread.

**NOTE: I am a fairly new Shopify partner (I started so I could do some front-end dev on my own company’s store), so please back up / establish version control first if you decide to try my below advice. I’m not an expert yet. ****

So, I’m trying to do the exact opposite as you (route my product URLS as /products/xyz-product instead of /collections/abc-collection/products/xyz-product), because I’m trying to preserve link equity and not split the measured traffic in Google Analytics. So, I applied Tejas’ advice of replacing the product.url in the various templates where it appears.

I wanted to REMOVE the collection routing, so I found instances of this in my collections templates:

{{ product.url | within: collection }}

and replaced that with this:

{{ product.url }}

and it worked like a charm.

I wonder if, since you want to ADD the collection routing, you could do the opposite, and find instances of the following syntax in your various pages:

{{ product.url }}

and replace it with this:

{{ product.url | within: collection }}

It’s worth a shot! And if that doesn’t do it you can always roll it back.

1 Like