RankpediaA plain-English encyclopedia of search

Magento Sitemap.xml

Tells a search engine which URLs to crawl on a Magento store, listing products, categories, and CMS pages in a single XML file for efficient discovery.

If you generate a sitemap but never submit it to Google Search Console, you are leaving most of its discovery benefit unused.

Key points

  • Submit the sitemap URL in Google Search Console after each generation.
  • Verify the sitemap path matches your store’s root or media directory.
  • Include all relevant content types: products, categories, and CMS pages.
  • For multi-store setups, generate a separate sitemap per store view.

A sitemap that never gets submitted

A Magento 2 store with 10,000 products generates a sitemap.xml in the /media/ directory. The owner sets auto-generation weekly but never submits the URL to Google Search Console. After six months, only 30% of product pages are indexed. Submitting the sitemap and monitoring in Search Console reveals that the store’s crawl budget was being wasted on low-value pages, and indexing climbs to 80% within two weeks.

Three checks before you submit the sitemap

  • File location Always confirm the sitemap file is accessible at the URL you submit—typically yourdomain.com/media/sitemap.xml. A 404 means Google cannot read it.
  • Content completeness Ensure the sitemap lists all important URLs: products, categories, and CMS pages. Missing categories can leave entire sections of the store undiscovered by search engines.
  • robots.txt not blocking Check that your robots.txt file does not disallow the sitemap path. A disallowed path prevents crawlers from accessing the file, making the sitemap useless.

Three settings that control sitemap content

  • Content types In Magento Admin under Stores > Configuration > Catalogue > XML Sitemap, you can choose which content types to include: products, categories, and CMS pages.
  • Generation frequency Set the frequency of sitemap regeneration: daily, weekly, or monthly. Frequent updates help search engines see new products faster but may increase server load.
  • Store view selection For multi-store setups, select the correct store view when generating the sitemap. Each store view should have its own sitemap file to avoid mixed content.

Common questions

Why is it important to submit the sitemap to Search Console?

Submission tells Google the exact URL of your sitemap, so it can fetch and use it for crawling discovery. Without submission, Google may never find it.

How often should I regenerate the sitemap?

Regenerate your sitemap as often as your store content changes. Daily is common for large catalogues with frequent updates; weekly may suffice for smaller stores.

What should I do if the sitemap is not accessible?

Check the file path and permissions. Ensure the sitemap file exists in the correct directory and is readable by crawlers. Also check that robots.txt does not block it.

Sources

  1. Adobe Commerce documentation Official guide for generating sitemaps in Magento 2
  2. Google Search Central General best practices for XML sitemaps
  3. Google Search Console Help How to submit and monitor sitemaps in Search Console