Solved

What are solutions for canonical URL issues in Shopify?

SAWman
Tourist
3 1 3

Hey folks, i am getting an error from a site audit stating that i have 98 Canonical URLs with no incoming internal links. i have worked tirelessly trying to optimize this site as it is my business. i am running into an area that i could use a bit of direction or assistance. any reply would be very much appreciated. thank you, dan   site is- www.sawoodcrafting.com

Accepted Solution (1)
SAWman
Tourist
3 1 3

This is an accepted solution.

Parm, i am using a free theme called Debut. i was able to find the code on line 2 of the product-card-grid.liquid file. 

looks like this:   {{ product.url | within: collection }}

was told to edit to look like this:    {{ product.url }}

 

it is likely that shopify is using the site/product/item url as the canonical and this cannot be edited.

if your products pages are all showing the site/collection/product/item in the url box, removing the 'within: collection' in the code should correct the internal linking issue for those urls.

i am waiting for my site to be crawled again to know if it worked but i am pretty confident. hope this helps.

View solution in original post

Replies 7 (7)

Parmegastore
Excursionist
17 1 1

Im Also struggling with this. What theme do you have ? Ive got supply. Ive looked through old advice but i cant seem to find the code they are talking about. I Have 1900 link warnings.

SAWman
Tourist
3 1 3

This is an accepted solution.

Parm, i am using a free theme called Debut. i was able to find the code on line 2 of the product-card-grid.liquid file. 

looks like this:   {{ product.url | within: collection }}

was told to edit to look like this:    {{ product.url }}

 

it is likely that shopify is using the site/product/item url as the canonical and this cannot be edited.

if your products pages are all showing the site/collection/product/item in the url box, removing the 'within: collection' in the code should correct the internal linking issue for those urls.

i am waiting for my site to be crawled again to know if it worked but i am pretty confident. hope this helps.

Godders
Visitor
1 0 0

I have have also fixed the issue with 'within: collection' however I am getting issues with tags were shopify are building the URL https://www.amaroc.co.uk/collections/vendors?q=wemico.

 

I think I can fix it by updating Robot.txt to not crawl these. Anyway I found brilliant sources of information, see below.

 

https://logeix.com/shopify-robots-txt/

 

https://logeix.com/shopify-seo/

SPaco
Shopify Partner
13 1 1

Was this ultimately the solution as I've seen no uptick in voting or a solution badge applied here. 

SAWman
Tourist
3 1 3

that did fix it, very sorry for not verifying . im obviously new to this. thanks

SPaco
Shopify Partner
13 1 1

No harm, no foul! Thanks for letting me know.

nchachula
Tourist
3 0 1

After I changed this to {product.url} I am now getting thousands of crawl issues from google:
Canonical URL has no incoming internal links

Is anyone else having this issue?