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.
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
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:
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:
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