Fix Your Sitemap for Shopify

Updated April 2026·By SitemapFixer Team

Shopify generates /sitemap.xml automatically as a sitemap index referencing products, collections, pages, and blogs. The default is mostly fine - except when it isn't. Product variants, unpublished-but-linked items, and the myshopify.com preview domain all produce subtle indexing problems.

Analyze your Shopify sitemap nowTry Sitemap Fixer Free

Shopify's sitemap is the most restrictive of any ecom platform: you can't edit the file, can't add fields, can't mark individual products for exclusion. What you do have is product visibility, collection settings, and robots.txt.liquid - and those three levers cover 95% of real problems.

Audited a Shopify Plus jewelry store last quarter. 4,200 active products, sitemap_products_1.xml showing 4,200 (good), but GSC reported 7,800 URLs under "Crawled - currently not indexed". The culprit: product variants at ?variant=123456 were linked internally from the product gallery, crawled, and self-canonicalized to the parent - but Google still counted them as crawl budget. A robots.txt rule fixed it.

Shopify sitemap structure

https://yourstore.com/sitemap.xml           # index
  |- sitemap_products_1.xml                  # first 5,000 products
  |- sitemap_products_2.xml                  # next 5,000
  |- sitemap_collections_1.xml
  |- sitemap_pages_1.xml
  |- sitemap_blogs_1.xml

Each sub-sitemap caps at 5,000 URLs. Shopify paginates automatically past that. You submit the index URL to GSC; it handles the rest.

Common Shopify Sitemap Issues

robots.txt.liquid for filter and variant URLs

Shopify lets you edit robots.txt.liquid in the theme code. This is the only way to block crawling of specific URL patterns. Example:

{% for group in robots.default_groups %}
  {{- group.user_agent }}

  {%- for rule in group.rules -%}
    {{ rule }}
  {% endfor -%}

  {# Block variant and filter URLs #}
  Disallow: /*?variant=
  Disallow: /*?pf_st_
  Disallow: /*?pf_pt_
  Disallow: /*?_pos=
  Disallow: /*?_sid=
  Disallow: /*?_ss=

  {%- if group.sitemap != blank %}
    Sitemap: {{ group.sitemap }}
  {%- endif %}
{% endfor %}

Edit at Online Store > Themes > Code > Templates > robots.txt.liquid (you may need to create it). Changes apply immediately.

Unpublishing and the myshopify.com domain

To remove a product from the sitemap, set its Online Store sales channel to inactive or archive the product entirely. Both take effect on the next cache cycle (usually within an hour). For the *.myshopify.com preview domain, Shopify automatically adds X-Robots-Tag: noindex - you don't need to do anything, but verify with curl -I https://yourstore.myshopify.com/ and look for the header. If it's missing, open a Shopify support ticket.

Markets and hreflang

Shopify Markets gives you separate URLs per region (yourstore.com/en-gb/, yourstore.com/en-au/). Each market gets its own sitemap index, and Shopify emits hreflang alternates in the HTML head automatically. What it does not do: emit xhtml:link alternates inside the sitemap XML. For large multi-market stores, consider a supplemental sitemap with explicit alternates submitted separately in GSC.

Step-by-Step Fix Guide

  1. Submit yourstore.com/sitemap.xml to GSC (not .myshopify.com)
  2. Edit robots.txt.liquid to block variant and filter parameter URLs
  3. Archive or unpublish products you don't want indexed
  4. Review blog posts set to "Visible" - anything not ready should be a draft
  5. For Markets, confirm hreflang is emitted in HTML head via view-source: inspection
  6. Check that *.myshopify.com returns X-Robots-Tag: noindex
  7. Verify the sitemap with curl https://yourstore.com/sitemap.xml
  8. Monitor GSC coverage per sub-sitemap

Frequently Asked Questions

Where is the Shopify sitemap?
At yourstore.com/sitemap.xml. It's an index file that references sitemap_products_1.xml, sitemap_collections_1.xml, sitemap_pages_1.xml, and sitemap_blogs_1.xml. Shopify generates and caches this automatically.
Can I exclude products from the Shopify sitemap?
Only by unpublishing them from the Online Store sales channel. There's no per-product sitemap exclude toggle. If a product is published, it's in the sitemap. Archive or unpublish it to remove it.
Do collection filters show up in Shopify's sitemap?
No, Shopify's sitemap only contains canonical collection URLs, not filtered variants. But Google may still crawl filter URLs if they're linked from your site - block them in robots.txt if you don't want them crawled.
Analyze your Shopify sitemap
Find all issues in your sitemap - free, no credit card needed
Analyze My Sitemap Free
Other platform guides