Created
July 11, 2019 11:08
-
-
Save jinesh24/8e118849c8dd162a9e92d28352c24749 to your computer and use it in GitHub Desktop.
Shopify Collection Tags Duplicate Content Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if template contains 'collection' and current_tags %} | |
<meta name="robots" content="noindex" /> | |
<link rel="canonical" href="{{ collection.url }}" /> | |
{% elsif template contains 'blog' and current_tags %} | |
<meta name="robots" content="noindex" /> | |
<link rel="canonical" href="{{ blog.url }}" /> | |
{% else %} | |
<meta name="robots" content="index,follow"> | |
<link rel="canonical" href="{{ canonical_url }}" /> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment