An XML sitemap is a structured file that lists every page on a website along with metadata about each page (last modified date, change frequency, priority). Search engines use the sitemap to discover content and prioritize crawling. Where a regular sitemap is broader (often referring to navigation maps for users), an XML sitemap is specifically for search engine consumption.
What an XML sitemap does
- Aids discovery: tells search engines about pages they might not find through normal crawling, especially pages with few internal links or deep navigation depth.
- Provides metadata: last-modified dates help search engines prioritise re-crawling of recently-updated content; change frequency hints suggest how often pages typically update.
- Indicates structure: the sitemap reveals the site's content hierarchy and surface area in a single file, useful for large sites.
- Supports image and video discovery: extended sitemap formats include image and video metadata that help with media-specific search results.
XML sitemap on Shopify specifically
Shopify generates and maintains an XML sitemap automatically at /sitemap.xml. The auto-generated sitemap includes:
- All published products
- All published collections
- Pages (about, contact, custom pages)
- Blog posts and articles
Shopify's auto-generated sitemap is generally adequate. Common considerations:
- Newly published content: can take hours to a day to appear in the sitemap. Not instant.
- Excluded pages: the sitemap doesn't include unpublished products, archived collections, or pages explicitly excluded via robots.txt.
- Large catalogs: sitemaps over 50,000 URLs are split into multiple files with a sitemap index. Shopify handles this automatically.
- International stores: Shopify Markets generates locale-specific sitemaps for multi-region stores.
When to consider a custom sitemap
- Headless setups where Shopify isn't generating the storefront. The sitemap needs to be generated by the front-end framework or a separate service.
- Custom URL structures not covered by Shopify's defaults — landing pages built outside Shopify, application content, etc.
- Granular crawl control for very large catalogs where sitemap-segment-level prioritization matters.
Submitting the sitemap
Sitemap URLs should be submitted to Google Search Console and Bing Webmaster Tools. Once submitted, search engines re-fetch the sitemap periodically to discover changes. Submission isn't required for crawling — search engines will find the sitemap if it's referenced from robots.txt — but explicit submission produces faster indexing for new content.