Paginated pages are common in Shopify stores, especially for blogs, collections, and search results. These pages are useful for users but often result in duplicate content that can affect your store's SEO. Adding the noindex, follow
meta tag to paginated pages ensures that search engines do not index these duplicate pages while still allowing them to follow links on your site.
In this guide, we’ll walk through how to add the noindex, follow
meta tag to paginated pages as well as other types of Shopify pages:
- Paginated Pages (like
?page=2
in collections or blogs) - Collection pages
- Blog pages
- Product pages
- Search result pages
- Custom pages (e.g., FAQ, Privacy Policy)
1. Adding the "Noindex, Follow" Tag for Paginated Pages
If you want to prevent search engines from indexing paginated pages (such as pages 2, 3, etc., in collections or blogs), you can add the noindex, follow
tag to these pages specifically.
Steps:
- In your Shopify admin, go to Online Store > Themes.
- Click Actions > Edit Code.
- Open the
theme.liquid
file located under the Layout folder. - Add the following code in the
<head>
section of your theme:
{% if canonical_url contains '?page=' %} <meta name="robots" content="noindex, follow"> {% endif %}
This will apply the noindex, follow
meta tag to any page that has a ?page=
query string, such as paginated blog or collection pages.
2. Adding the "Noindex, Follow" Tag for Collection Pages
Sometimes, you may want to prevent all collection pages from being indexed, especially if they contain duplicate or temporary product listings.
Steps:
- Open the
theme.liquid
file. - Add the following code in the
<head>
section:
{% if template contains 'collection' %} <meta name="robots" content="noindex, follow"> {% endif %}
This code checks if the current page is a collection page and adds the noindex, follow
tag to those pages.
3. Adding the "Noindex, Follow" Tag for Blog Pages
For blog pages, particularly older or irrelevant blog posts, you may want to apply the noindex, follow
tag to prevent them from being indexed.
Steps:
- In your theme.liquid file, add this code in the
<head>
section:
{% if template contains 'blog' %} <meta content="noindex, follow" name="robots"> {% endif %}
This will apply the noindex, follow
tag to all blog pages on your store.
4. Adding the "Noindex, Follow" Tag for Product Pages
In cases where certain product pages shouldn’t be indexed (such as out-of-stock or hidden products), you can apply the noindex
tag selectively.
Steps:
- Open the
theme.liquid
file. - Add the following code in the
<head>
section:
{% if template contains 'product' %} <meta content="noindex, follow" name="robots"> {% endif %}
This ensures that only product pages will have the noindex, follow
tag.
5. Adding the "Noindex, Follow" Tag for Search Result Pages
Search result pages often contain content duplication, and you may want to prevent these from being indexed by search engines.
Steps:
- Open the
theme.liquid
file. - Add this code in the
<head>
section:
{% if template contains 'search' %} <meta content="noindex, follow" name="robots"> {% endif %}
This code ensures that search result pages will not be indexed by search engines.
6. Adding the "Noindex, Follow" Tag for Custom Pages
For custom pages such as FAQs, Privacy Policy, or any other page where indexing isn’t necessary, you can apply the noindex, follow
tag using the following steps.
Steps:
- Open the
theme.liquid
file. - Add this snippet to check if the current page is a custom page:
{% if template contains 'page' and canonical_url contains 'your-custom-page-handle' %} <meta content="noindex, follow" name="robots"> {% endif %}
Replace 'your-custom-page-handle'
with the specific handle for the custom page.
Conclusion
Adding the noindex, follow
meta tag is an effective way to prevent search engines from indexing pages that do not provide unique value to your site's SEO, such as paginated pages, search results, or temporary product pages. This guide should help you implement these changes for various page types across your Shopify store.
Be strategic when applying the noindex
tag, as overusing it may prevent important pages from being indexed and discovered by potential customers.
If you need further assistance or have any questions, feel free to reach out!