collections url showing as only one incoming internal link

collections url showing as only one incoming internal link

ihs1
Explorer
102 1 9

Hi

 

ive been given a seo audit error saying my collections url only have one incoming internal link. however these are the same product pages, but the url is through the collections, therfore the url has collections in it too. how do i make it so that there arent 2 different urls for the same page. 

 

for example:

https://infraredheatingsupplies.com › products › ceiling-brackets

https://infraredheatingsupplies.com/collections/accessories/products/ceiling-brackets

 

both pages are exactly the same. i think shopify has automatically made a canonical tag for these pages, but the seo audit still says the 2nd url only has one incoming link, when in reality it is the same product page which has quite a few internal links

 

hope this makes sense

 

please can someone help

Replies 6 (6)

PaulMartin
Shopify Partner
386 48 99

Hey Ihs,

The code that's causing your site to have links that are /collections/collection-name/products/product-name, is this piece of code here:

{{ product.url | within: collection }}

This is likely to be located in the code that controls how a collection is being rendered in your page. To fix this, all you'll need to do is to change the code above into this:

{{ product.url }}


Hope this helps!

Don't forget to like and mark as solution
Contact here for WhatsApp | Email
$30 fix rate for theme fixes & customization
ihs1
Explorer
102 1 9

HI

where do i change this code? i seen this on another thread but could not find the liquid file for collections

PaulMartin
Shopify Partner
386 48 99

Not entirely sure what your files look like or how they are named but try to look for the file named "featured-collection.liquid". That should be one place to look at

Use the Theme Code Editor. Themes > Theme of choice > ... > Edit Code. Then search for the file. Then by using CTRL + F, search for the code:

{{ product.url | within: collection }}
Don't forget to like and mark as solution
Contact here for WhatsApp | Email
$30 fix rate for theme fixes & customization
ihs1
Explorer
102 1 9

HI

 

i still cannot find this exact file, however i have checked my other files with the word 'collection', and then tried searching for the above in the code, but cannot find anything

 

my theme is Empire

ihs1
Explorer
102 1 9

HI

please can someone help with the above as i still cannot find the file where it says {{ product.url | within: collection }}

PaulMartin
Shopify Partner
386 48 99

Hi mate,

Sorry wasn't able to talk in the weekend, was busy. I sent you an email regarding this.

Don't forget to like and mark as solution
Contact here for WhatsApp | Email
$30 fix rate for theme fixes & customization