Home / Blog / SEO /

How to FIND and CREATE custom XML sitemaps in Shopify

Dan from NovosDan in SEO, Shopify

25th February, 2020

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)

create xml sitemap screaming frog

Upload as a file

  • Upload this to Shopify as a File – this will sit on the Shopify CDN.

upload file to shopify screen

shopify new file view

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.

url redirect in shopify screen

shopify redirect confirmation screen

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”.

upload xml sitemap to search console screen

sitemap success screen search console

  • About a week after this, you should be able to see an index coverage report for your sitemap.

coverage report screen search console

When to use a custom Shopify sitemap?

  1. 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.
  2. 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.
  3. This method could be used to upload hreflang sitemaps, (however, be careful as these would not be referenced in your robots.txt file).
  4. 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.

shopify sitemap index

This sitemap index URL is also referenced in all Shopify website’s robots.txt file if you’re struggling to locate it manually!

sitemap index URL in robots.txt

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):

xml sitemaps shopify

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.

Alternatively, if you have any other Shopify SEO questions you can fill in a quick form for a free call-back today

Dan from Novos
Article by Dan

Map your way to Shopify success

We're eCommerce specialists for a reason, get in touch with us today and find out more.

This is Novos

Get the latest blog posts and eCommerce tips in your inbox