Shopify Sitemap Limitations
One of the benefits/limitations of Shopify (depending on your perspective!) is that it automatically creates XML sitemaps split by page type.
However, for some more advanced SEO use cases, this can be limiting since these sitemaps cannot be manually altered and new sitemaps cannot easily be created on the CMS (and subsequently uploaded to Search Console.
How to create a custom XML sitemap:
- Upload all URLs you want in your custom sitemap to Screaming Frog in List Mode and crawl.
- Create an XML file using the Sitemap option in Screaming Frog (if you URLs are canonicalised or no-indexed make sure to select these options when creating your sitemap in Screaming Frog or they won’t be included)
Upload as a file
- Upload this to Shopify as a File – this will sit on the Shopify CDN.
Create a redirect
- Create a redirect from a new XML URL (Online Store>Navigation>URL Redirects>Create URL Redirect).
You cannot redirect from a URL that is still live so the redirect has to be from a URL that 404s.
Shopify returns a 404 for any URL that doesn’t currently exist so you can just make up any URL that isn’t currently live to use for your redirect.
For example, both the URLs below would result in a 404, and could therefore be used to redirect to your sitemap that’s hosted on the Shopify CDN:
example.com/example-url-that-i-made-up.xml
example.com/this-page-is-a-404.xml
When adding the redirect, the first URL is on your domain, this can just be the relative URL, however, the URL you are redirecting to should be the absolute URL as this sits on the CDN.
Upload to Search Console
- Upload the redirecting sitemap URL to Search Console. (Index>Sitemaps>Submit Sitemap.)
- This will take a day or so to process, during which time the Status may appear as “Couldn’t Fetch”. However, soon after you should see “Success”.
- About a week after this, you should be able to see an index coverage report for your sitemap.
When to use a custom Shopify sitemap?
- If you migrate to Shopify and change URL structure, this could be used to help to process redirects and remove old URLs from the index.
- If you consolidate sections of your site it can be useful to include old URLs in a sitemap to help Google process redirects that are in place and remove these URLs from their index.
- This method could be used to upload hreflang sitemaps, (however, be careful as these would not be referenced in your robots.txt file).
- If you have customised your Shopify CMS and have product variants that are not included by Shopify in sitemaps, this can be used to include them in a sitemap.
Can I see my custom Shopify sitemap in robots.txt?
Since you cannot edit the robots.txt file in Shopify, the sitemap won’t be linked from there, however, it does mean you can upload the sitemap to Search Console to track the performance on URLs and improve crawling of these URLs.
How to find default Shopify sitemaps?
Default sitemaps created by Shopify can be accessed via the sitemap index at example.com/sitemap.xml.
This sitemap index URL is also referenced in all Shopify website’s robots.txt file if you’re struggling to locate it manually!
If you load each XML sitemap that’s listed in the sitemap index in your browser you’ll see a list of each of the different pages via page types (products, pages, collections, blogs):
These can be uploaded individually to Search Console to check pages are being correctly indexed!
If you’re looking to learn more about how to improve your Shopify website’s SEO then check out our Ultimate Guide to Shopify SEO.