Skip to content
Searchpedia SEO field notes Callum Bennett Callum

Site ops

Magento Sitemap.xml

Stop overthinking the sitemap.xml in Magento – generate it with default settings and submit to Search Console, and you are 90% done.

Beginner3 min readUpdated 2026-07-27Notes by Callum Bennett

Start here

  • Go to Admin > Marketing > SEO & Search > Site Map, add a new sitemap with filename sitemap.xml and path /media/, then Save & Generate.
  • Copy the sitemap URL (https://yourstore.com/media/sitemap.xml) and submit it in Google Search Console under the Sitemaps section.
  • For multi-store setups, create a separate sitemap for each store view and submit each to Search Console with the correct base URL.
  • Set up a daily cron job to regenerate the sitemap via Stores > Configuration > Catalogue > XML Sitemap > Generation Settings.

Plain-English take

Your Magento sitemap.xml is a simple XML file that lists every URL you want search engines to crawl. Think of it as a hand-delivered index for your store. Magento 2 generates it natively: go to Marketing > SEO & Search > Site Map, click Add Sitemap, set filename to sitemap.xml and path to /media/, then Save & Generate. The file lands at https://yourstore.com/media/sitemap.xml. Now the critical step: submit that URL in Google Search Console. Without submission, Google may never pick it up, even if you reference it in [robots.txt](/robots-txt/). I always submit manually. For a store with 5,000 products, the sitemap might include 5,200 URLs plus CMS pages. Without it, a crawler must find every page through internal links – orphaned pages stay hidden. I leave frequency and priority defaults because Google largely ignores them. Use the sitemap as a discovery tool, not a ranking lever. For multi-language setups, create one sitemap per store view and reference them in a sitemap index file. Magento can do that if you configure each store view. Keep the sitemap clean: exclude noindex pages, pages with [duplicate content](/duplicate-content/), or any URL you do not want indexed. Magento's default includes all visible products and categories, which is usually what you want, but double-check for hidden products or excluded groups.

When it actually matters

The sitemap matters most when your store is large – 500+ products – when you add products daily, or when you run multiple store views. But I have seen people obsess over sitemap settings for a 50-product store with solid internal linking. That store probably does not need one. I would still generate it because it takes two minutes, but I would not prioritise it over fixing a broken [canonical tag](/canonical-tag/) or slow server. The real value of a sitemap is the feedback loop in Search Console: you can see how many submitted URLs are indexed, how many excluded, and why. For a 2,000-product store where only 500 are indexed, the sitemap report tells you there is a problem. That saves weeks of guessing. Another case: seasonal catalogues. If you add 300 products in October and remove them in January, the sitemap helps Google rediscover them each year. Without it, new products may take weeks to be crawled. On the other hand, a static catalogue of 80 products that never changes – the sitemap adds zero benefit. My rule: if your store has more than 300 URLs or any product changes monthly, generate and submit a sitemap. Otherwise, spend time elsewhere. One edge case: if you use a [PWA](/pwa/) or JavaScript rendering, the sitemap becomes critical because crawlers may not discover JavaScript-generated links. Include image sitemaps if product images drive traffic.

What I got wrong

First: I assumed that referencing the sitemap in robots.txt would let Google find it. It did not. Google's crawler does not always follow sitemap directives in robots.txt – it is a hint, not a guarantee. I waited two weeks with no sitemap report in Search Console. Now I always submit the URL manually, even if I also reference it in robots.txt. Second: multi-store confusion. I once generated a single sitemap listing all URLs from English, French, and German store views. Google tried to index the French product under the English base URL, causing redirects. Now I generate separate sitemaps per store view and match each to the correct domain, especially when using [hreflang tags](/hreflang-tags/). Third: I thought a submitted sitemap would guarantee indexing. It does not. A client with 5,000 products in the sitemap had only 1,200 indexed. The problem was thin product descriptions, not the sitemap. Now I always run an [SEO audit](/seo-audit/) after submission to check indexed vs submitted pages. Another mistake: I ignored the generation schedule. Default Magento generates the sitemap once. If you add 200 products the next day, they are missing. I now set up a cron job to regenerate daily via Stores > Configuration > Catalogue > XML Sitemap > Generation Settings.

Next step

Quick answers

Does the sitemap.xml guarantee that all my products get indexed?

No. It only suggests URLs for crawling. Google may still decide not to index a page if it deems it low quality, duplicate, or irrelevant. Check the Index Coverage report in Search Console to see what happened to each submitted URL.

How often should I regenerate the sitemap?

If your catalogue changes daily, set Magento to regenerate daily. For static stores, weekly is enough. The setting is under Stores > Configuration > Catalogue > XML Sitemap > Generation Settings. I use daily for any store with frequent updates.

Can I have multiple sitemaps for a single Magento store?

Yes. You can split products, categories, and CMS pages into separate sitemaps, or create a sitemap index file. Magento does not do this natively, but you can use extensions. For most stores, a single sitemap is fine until you exceed 50,000 URLs.

Sources

Primary documentation is linked directly. Anything commercial is marked nofollow.

Notes from Callum Bennett.