Shopify URL & SEO Query - /Collections on product page URL

George_Greenhil
Explorer
64 0 25

Hello guys,

I have just joined Ahrefs (SEO tool).

It's flagged an error that many product pages don't have any incoming direct internal links.

I believe this might be because to get to most product pages online, customers will often click via collection pages adding a "collections/bang-energy/" to this product for example https://proteinpackage.co.uk/products/bang-energy-zero-calorie-energy-drink-bangster-berry so that it displays as https://proteinpackage.co.uk/collections/bang-energy/products/bang-energy-zero-calorie-energy-drink-....

This means there are many canonical but no actual direct ones which Ahrefs says might negatively impact SEO and is classed as an error.

Is there a way to remove the "/collections/xxxxxx" after you click from a collection? 

Finally, what are your thoughts on this? Is there any reason you'd advise against making this type of change?

Images are attached for reference. 

Many thanks,
George Greenhill

 

Screenshot 2021-07-19 at 14.34.53.pngScreenshot 2021-07-19 at 14.34.59.pngScreenshot 2021-07-19 at 14.35.02.pngScreenshot 2021-07-19 at 14.35.28.pngScreenshot 2021-07-19 at 14.36.04.png

KetanKumar
Shopify Partner
20574 2128 7789

@George_Greenhil 

sorry for that issue 

its dynamic shopify code doesn't possible to change code

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
KieranR
Shopify Partner
296 24 88

Is there a way to remove the "/collections/xxxxxx" after you click from a collection?

So the URL routing in Shopify is not flexible, but you can easily change the internal linking.

Just find something like this in theme code:

 

<href= “{{ product.url | within: collection}}”>

 

Then remove the | within: collection bit so you are left with:

 

<href= “{{ product.url }}”>

 

Typically you'd find that within your collections.liquid somewhere - but every theme is a bit different, it may be in a nested snippet or something else. Easiest way I find is to use the Bold theme search extension and find "within: collection" usually that does the trick. Then surgically find/replace.

The effect of this is that collection pages will no longer link to /collection/abc/products/xyz pages and instead they'll link directly to /products/xyz pages. The down-side is you loose breadcrumbs and need a bit of customization to get them back.

Personally I prefer doing this on most Shopify stores, as it sends a stronger signal about which pages are important (canonical tags can a bit weak and get ignored by Google), it helps internal pagerank/link equity flow, helps simplify reporting etc. Technically the dupe pages will still exist and be accessible to direct type in traffic - but with no internal links they should eventually disappear if they happen to be indexed in Google. Should sort out those errors in Ahrefs too.

Just a side-note with SEO tools; it's important to understand the context and why you're fixing things. Simply taking automated audit reports like that at face value, is okay but can sometimes lead you to fix technical things that are really not big problems in the scheme of things.

Full time Shopify SEO guy, based in NZ. Sometimes freelance outside the 9-5.