Magento has built-in XML sitemap generation — no third-party extension required for the basics. The challenge is that it's off by default and needs a scheduled cron job to stay current, which catches a lot of stores running a stale sitemap without realizing it.
Where Is My Magento Sitemap?
Once generated, the sitemap is typically available at:
yourdomain.com/sitemap.xml
The exact filename and path are configurable in the admin — if /sitemap.xml 404s, check the configured path before assuming generation failed.
Setting Up Sitemap Generation (Magento 2)
- Go to Stores → Configuration → Catalog → XML Sitemap in the admin panel.
- Under Search Engine Submission Settings, enable submission to robots.txt so crawlers can discover the sitemap automatically.
- Configure which entity types are included — products, categories, and CMS pages each have their own inclusion toggle and priority settings.
- Go to Marketing → SEO & Search → Site Map and add a sitemap with a filename and generation path.
- Set a generation schedule — Magento generates the sitemap via cron, not on every product save, so this step is what actually keeps it current.
The Cron Job Is Not Optional
Magento's sitemap only regenerates when its cron schedule runs. If Magento's cron isn't configured at the server level — a common gap after migrating hosts — the sitemap silently stops updating while products and categories keep changing. Confirm cron is actually running with bin/magento cron:run or by checking the cron schedule in the admin, not just that a schedule is configured.
Excluding Out-of-Stock and Disabled Products
By default, Magento can include out-of-stock products in the sitemap depending on your catalog visibility settings. For most stores, out-of-stock products with no restock date shouldn't stay in the sitemap indefinitely — they're not useful pages to send search engines toward. Set product visibility to "Not Visible Individually" or disable the product outright once it's permanently discontinued, rather than leaving it live but unavailable.
Common Magento Sitemap Problems
Sitemap returns a 404
Confirm a sitemap has actually been generated at least once under Marketing → SEO & Search → Site Map — creating the configuration entry doesn't generate the file until the first cron run or a manual "Generate" action.
Sitemap is missing recently added products
Almost always a cron problem — see above. If cron is confirmed running, check that the new products' visibility and status are set to appear in the catalog; a product that's disabled or hidden from catalog search won't be included regardless of cron.
Store-view or multi-language duplicates
Multi-store Magento setups generate a separate sitemap per store view. Make sure each store view's sitemap only lists that store view's canonical URLs, and that you're submitting the correct per-store sitemap to the matching Search Console property — mixing them up creates the appearance of duplicate content across store views that are actually distinct properties.
Submitting Your Magento Sitemap to Google
- Open Google Search Console and select your property.
- Click Sitemaps in the left sidebar.
- Enter the sitemap filename you configured and click Submit.
For general ecommerce sitemap structure — separating product, category, and image sitemaps as a catalog grows — see ecommerce sitemap best practices.