Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Blog tags causing duplicate meta description issue

Blog tags causing duplicate meta description issue

Oliv
Tourist
5 0 2

I am running into the problem, where blog tags are creating issue with duplicate meta descriptions. It looks like all blog tags have the same meta description? Is there a way to either change individual blog tag description, or hide tags from being indexed? Please help!

Replies 13 (13)

PieterB22
Shopify Partner
55 9 15
Hi, did you scroll to the bottom of your blog entry page? You can update the meta tags from there.
Oliv
Tourist
5 0 2

This is not what I am referring to. I am not talking about meta tags for blog posts. I am referring to meta description and titles for the actual tags, that you add for each blog posts.

PieterB22
Shopify Partner
55 9 15

Hi Oliv,

That is a bit strange. Would you mind sharing a link to your site? The tags are only supposed to be added as meta keywords and not have their own content.

Oliv
Tourist
5 0 2

No, the tags are added as actual pages. Here is one example: https://appliedspeed.com/blogs/tech/tagged/afco-racing

PieterB22
Shopify Partner
55 9 15

Hi, so I have been playing around with this and the tags use your default blog.liquid template to create the page. So all items in the "tech" blog category will have the same meta description.

I was able to come up with some sort of solution for this. I altered the code in the theme.liquid
from this:

{% if page_description %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}

to this:

{% if page_description != blank and blog.tags == blank %}
<meta name="description" content="{{ page_description | escape }}">
{% elsif blog.tags != blank and page_description == blank %}
{% for article in blog.articles %}
<meta name="description" content="{{ article.excerpt | truncate: '150' }}">
{% endfor %}
{% else %}
<meta name="description" content="{{ page_description | escape }}">
{% endif %}

You can copy this code and replace it inside your theme.liquid

What this does it checks whether or not the blog has tags and if it has tags, it creates a meta description from the filtered articles excerpts.

Please let me know if this resolves your issue.

Oliv
Tourist
5 0 2

Unfortunately, that code didn't work. 

marlsg11
Visitor
1 0 1

im having this same problem, did you ever find a solution?

AWM
Visitor
1 0 3

Here's my solution for the same issue that will only change the meta on those tag pages - in theme.liquid replace:

if page_description %}
<meta name="description" content="{{ page_description | escape }}" />
{% endif %}

with the following:

{% if template == 'blog' and current_tags != blank %}
<meta name="description" content="COMPANY NAME blogs tagged with {{ current_tags.first }}.">

{% elsif page_description %}
<meta name="description" content="{{ page_description | escape }}" />
{% endif %}

 

This gives you a unique meta description for those tag pages but leaves the meta description as is for the actual blog pages.

Hope that helps! 🙂

arcform
Tourist
28 0 1

Where would I find this code on the minimal theme, as I am having the same problem but this code doesn't exist in my liquid file on minimal.

Any help would be much appreciated.

Jenny

guestgeek
Tourist
7 0 1

Thank you! We had the same issue and this worked like a charm for us.

DogBraceGuy
Visitor
1 0 0

This is helpful unless there are multiple pages of blog posts, then it continues to duplicate the title. For example

yannis23
Tourist
4 0 0

Thank  you!! 

gleko123
Visitor
2 0 0

Hey Friend, 

 

Had the same issue and here is the solution: 

Go to the links that have that /tagged content

(in your case https://appliedspeed.com/blogs/tech/tagged/afco-racing)

Then for each article that's on that link, go to the individual blog post, and remove the tags. 

 

When you create a tag on a blog post, it creates a duplicate /tagged page with the same metadata as the blog itself, causing an SEO issue. 

 

In your case: Open this blog post: "The best way to improve power of a supercharged camaro or mustang" and on the right just remove the tags that you have. Should fix the issue.