Vendor list Does Not Link to Updated to Category Page

Vendor list Does Not Link to Updated to Category Page

sam163
Excursionist
32 1 3

Hello,

A year or so ago i added a vendor list using a snipet that i found here, the problem is i was  checking to see where i ranked for  a particular keyword, and the category page that is been ranked for by google has not been updated even though i have added some content to the top of my page, its still showing the old version of the page when i added the snippet: the url is also different because i added a collection vendor and each vendor/brand to the collection.

 

The problem seems i have duplicate pages of the same category and this would probably means all the vendors and categories for each brand.

I wont be able to rank my pages as new or updated information  is not showing when vendors page ranks in google.

https://it.xxxxx.com/collections/vendors?q=Mielle%20Organics

https://it.xxxxx.com/collections/mielle-rosemary

How can i resolve this issue?  I would like to keep the vendors list but it should link to all updated collection not to the old version of the page.This could also resolve the issue that i have with duplicated pages.Thanks

Here is the code

{% assign match = False %}

{% assign vendor_collection_handle = vendor | handleize | strip | escape %}

 

{% for collection in collections %}

{% if vendor_collection_handle == collection.handle %}

{% assign match = true %}

{% endif %}

{% endfor %}

 

{% if match %}

<li class="vendor-list-item"><a href="/collections/{{ vendor_collection_handle }}">{{ vendor }}</a></li>

{% else %}

<li class="vendor-list-item">{{ vendor | link_to_vendor }}</li>

{% endif %}

 

<style>

.vendor-list-item a

{color: #000;

text-align:center;

text-decoration: none;

border-bottom: 2px solid #fff;

padding: 12px 16px;

display: inlne-block;

float: left;

position:relative;}

 

ul li{

display:inline-block;

position: relative;

white-space: nowrap

}

li.vendor-list-item:not(:last-child) {

margin-bottom: 5px;

}

ul ul{

position:;

right:0;

padding:0px;}

 

.grid-container{

display:flex;

width: 150%; }

 

.vendor-list-item {float;

left:-50%}

 

</style>

Reply 1 (1)

Dotsquares
Shopify Partner
388 23 52

hi @sam163 

It looks like Google is indexing outdated vendor collection pages, possibly due to duplicate URLs or old cached content. Here’s how you can fix this:

 

Ensure Correct URL Structure: Instead of using link_to_vendor, make sure all vendor links in your snippet point to the updated collection format.

Modify your code like this:

<li class="vendor-list-item">
   <a href="/collections/vendors?q={{ vendor | handleize }}">{{ vendor }}</a>
</li>

 

This ensures all vendors point to the /collections/vendors?q=... format.

 

Set Up 301 Redirects: Go to Shopify Admin > Online Store > Navigation > URL Redirects, and redirect old vendor pages to the correct collection pages.

 

Request Reindexing: After making these changes, submit the updated URLs to Google Search Console to speed up reindexing.

Check for Canonical Tags: In your collection.liquid, add a canonical tag:

 

<link rel="canonical" href="{{ collection.url }}">

 

This helps Google understand which URL to prioritize.

 

Dotsquares Ltd


Problem Solved? ✔ Accept and Like solution to help future merchants.


Shopify Partner Directory | Trustpilot | Portfolio