How can I prevent google indexing 'tagged' product pages?

Highlighted
New Member
15 0 0

Hi, I wonder if anyone knows the answer to this.

Google is indexing 'tagged' product pages from my webiste, and not the important pages (if that makes sense). I read a while ago that this means duplicate content becasue shopify creates multiple URL's, so I removed the 'tags' from my products around 8 weeks ago but Google is still indexing these URL's.

In google search console I've requested google 'remove urls', and I've done Url re directs in shopify, but is there anything else I can do to stop this?

Thanks!

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
224 1 25

Hi, Bridget!

Patrick, a Shopify Guru here :). 

If Google has already indexed those pages you may need to just update your sitemap with them for them to be removed, have a look here at our guide on how to find your sitemap and how to submit it to Google. 

Hope that helps :)
Patrick
support@shopify.com

0 Likes
Highlighted
New Member
15 0 0

Hi, I still appear to be having this issue & so is my brother who also has a shopify store. We've both re submitted our sitemaps to google over the last couple of months, but it's still indexing these 'tagged' pages. 

My brothers 'Search Console' account tells him he has 51 duplicate meta decsriptions (all 'tagged' pages). 

I thought Shopify's 'Canonical' tags should take care of this? Does anyone have a solution?

This is driving us both insane!

0 Likes
Highlighted
Shopify Partner
5 0 1

This is the code you should use to resovle the issues

To add the rel=”canonical” tag to your website you’ll need to go back into your liquid.theme file where you added your Webmaster tag.

Before the </head> tag you need to add this line of code:

  • <link rel=”canonical” href=”{{ canonical_url }}” />

Or if your webstore has “sub-collections” or “tag pages” you don’t want to index (such as www.yourstore.com/collections/collection-name/tag-name) add this tag instead:

  • {% if template contains 'collection' and current_tags %}
    <meta name="robots" content="noindex" />
    <link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
    {% else %}
    <link rel="canonical" href="{{ canonical_url }}" />
    {% endif %}

It’s that simple! You don’t need to change this code for each page, Shopify will dynamically change it for you. Once you add this code to the theme file, you are all good to go

1 Like
Highlighted
New Member
15 0 0

Hi Savanna, thank you so much for your advice. I've been trying to solve this mystery for months!! 

I'm not very good with code at all! It scares the hell out of me really!

Have I done this correctly? I copied the code and pasted it before the <head> (on lines 7 to 12).

Hoping I've not completely messed up my site!! Lol!

0 Likes
Highlighted
New Member
1 0 0

Hi all, I want to remove tag words and pages from my canonical links, but my code is not working.

{% if template contains 'collection' and current\_tags %} 
  <link rel="canonical" href="{{ shop.url }}{{ collection.url }}" /> 
  {% else %}  {% assign canonical_url = canonical_url | split: '?page=' %}
<link rel="canonical" href="{{ canonical_url[0] }}" /> 
  {% else if %} <link rel="canonical" href="{{ canonical_url }}" />
  {% endif %}

Can you help me?

0 Likes
Highlighted
New Member
3 0 0

Awesome. 

{% if template contains 'collection' and current_tags %}
<meta name="robots" content="noindex" />
<link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
{% else %}
<link rel="canonical" href="{{ canonical_url }}" />
{% endif %}

Worked perfectly for me. 

0 Likes