Hiya, i’ve had an issue where i’ve seen that a vendor page has cannibalised a collection page and stolen its place in the SERP’s. I found the code below for canonical tags from shopify. I’m wondering if anyone knows the correct code to make vendor pages prioritise to collection pages if there is a collection with the same name as the vendor?
Assuming that the collectionname value is available in a variable called collection_name, you can update the code as follows:
{% if page_description %}
{% endif %}
Make sure to replace {{ collection_name }} with the actual variable or value that represents the desired collection name. This will generate the canonical_url with the updated format you mentioned: https://www.site.com/collections/collectionname.
Thank you for your response. It’s good to know that it’s worked for you. Kindly feel free to get back to me if you need any further assistance.
If helpful then please Like and Accept Solution.