;

Shopify and SEO #2 - Pagination + Filters

In our last post we discussed how Shopify default behavior is to internally link to your non-canonical pages, in case you missed it you can check it out here.

Here we will discuss how Shopify creates duplicate content issues on paginated pages and layered navigation/filtered pages.

Paginated Pages

Paginated pages are the prev/next pages you see in categories(or in Shopify lingo Collections), e.g.

  • https://www.ABC.com/collections/play-collection-ss20?page=3

  • https://www.ABC.com/collections/play-collection-ss20?page=2

  • https://www.ABC.com/collections/play-collection-ss20?page=1

Paginated pages are the different numered category/collection pages.

The above would not be such a big problem if all of the paginates pages had canonical links to the first page of each category, but this is not the case in Shopify by default.

Essentially what we are currently telling Search Engines is to index all of the paginated pages(with potentially the result that all of the pages are indexed lower), instead of directing search engines to index the first page of the category.

Shopify default behaviour concerning paginated pages.

Fortunately this is rather easy to solve by editing your theme.liquid file and instructing Shopify to add canonical links pointing at the first page irrespective of on which page in the category you are in.

Look for something like follows in your theme.liquid (usually around line 10)

<link rel="canonical" href="{{ canonical_url }}">

And replace it with something like this

{% if template contains 'collection' %} <link rel="canonical" href="{{ shop.url }}{{ collection.url }}" /> {% else %} <link rel="canonical" href="{{ canonical_url }}" /> {% endif %}

Instructing Shopify to set as canonical link on paginated pages the category root page.

You could also try adding noindex/follow on the paginates pages which would solve the issue with layered navigation pages as well, but more on that further bellow.

Layered Navigation pages

Layered navigation, or in Shopify lingo Filter, is when you can sort the products displayed in a category based on product attributes such as size, color, new/old, material, etc. The exact attributes based on which the sorting happens depends on the product attributes used on the website in question.

Category filters/layered navigation.

In practice it could look as follows

  • https://www.ABC.com/collections/dresses/

  • https://www.ABC.com/collections/dresses/size-36

  • https://www.ABC.com/collections/dresses/size-38

  • https://www.ABC.com/collections/dresses/size-40

Usually all of the above have identical content, except that there might be slight(or many times no) difference in the products displayed.

The above is a problem for the reason that we do not want duplicate content in general, it makes it unclear for search engines what to index and lowers the perceived overall quality of all pages with duplicate content.

The easiest way to solve the above would be to add noindex, follow tags on each of the filtered subcategories. Luckily this is rather easy to do by editing the theme.liquid file as follows

In <head> section of your theme.liquid add the following to remove URLs with 'size' in them from being indexed

{% if collection.url contains "/collections/size" %} <meta name="robots" content="noindex,follow"> {% endif %}

Blocking categories with 'size' in the URL from being indexed.

Conclusion

SEO in Shopify, just as in any other platform, is not always straightforward and there are no on-size-fits-all answers. For example, which pages you wish to excluded from indexing and which not will always vary to some extent from one site to another.

If you wish to discuss your own SEO needs more, drop as a line and we will be happy to assist you.