From the sitemap protocol to correct submission with Google and Bing
XML sitemaps are the technical foundation that lets Google and Bing find and crawl every product page, category, and CMS page of a Magento store in the first place. This article explains the sitemap standard in detail, shows how Magento automatically splits large catalogs into multiple files, which fields Google actually evaluates today, and how to submit your sitemap correctly to Google Search Console and Bing Webmaster Tools.
Table of Contents
- 1. Fundamentals: the XML sitemap standard for Magento stores
- 2. Sitemap index files: splitting large catalogs correctly
- 3. Priority and changefreq: why Google ignores them, but lastmod counts
- 4. Configuring Magento's built-in sitemap generation
- 5. The cron job and on-demand generation in practice
- 6. Submission: Search Console, Bing Webmaster Tools, and robots.txt
- 7. Image and hreflang annotations for multi-store setups
- 8. Common XML sitemap mistakes in Magento
- 9. Manual vs. automated sitemap maintenance compared
- 10. Summary
- 11. FAQ
1. Fundamentals: the XML sitemap standard for Magento stores
The XML sitemap standard has been a protocol jointly supported by Google, Bing, and other search engines since 2006, defined at sitemaps.org, and it specifies a simple, strictly structured XML format. The root element <urlset>, with the namespace http://www.sitemaps.org/schemas/sitemap/0.9, contains any number of <url> elements, each representing exactly one indexable page. The only mandatory field per entry is <loc>: the absolute, fully qualified URL including protocol and host, exactly matching the page's canonical URL. Special characters like & must be entity-escaped, and the file itself must be UTF-8 encoded, otherwise Google discards the entire file during parsing.
Three optional fields complement each entry: <lastmod> states the date of the last content change, <changefreq> gives a rough estimate of how often the content changes (always, hourly, daily, weekly, monthly, yearly, never), and <priority> provides a relative value between 0.0 and 1.0 for weighting within the same domain. Important for expectations: the standard explicitly describes these three fields as hints, not instructions. Googlebot and Bingbot still decide independently when and how often a URL gets crawled, regardless of what the sitemap states.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Minimal valid sitemap: loc is mandatory, the other three fields are optional hints -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://mironsoft-shop.com/women/dresses/summer-dress-blue.html</loc>
<lastmod>2026-07-08</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://mironsoft-shop.com/women/dresses.html</loc>
<lastmod>2026-06-30</lastmod>
<changefreq>daily</changefreq>
<priority>0.6</priority>
</url>
<url>
<loc>https://mironsoft-shop.com/shipping-and-delivery</loc>
<lastmod>2025-11-02</lastmod>
<changefreq>yearly</changefreq>
<priority>0.3</priority>
</url>
</urlset>
2. Sitemap index files: splitting large catalogs correctly
The sitemap standard limits every individual file to at most 50,000 URLs or 50 MB uncompressed, whichever limit is hit first. For a Magento catalog with tens of thousands of products, categories, and CMS pages, a single file quickly stops being enough. Magento detects this automatically: as soon as an entity type exceeds the limit, the sitemap generator produces multiple part files, such as sitemap-product-1.xml and sitemap-product-2.xml, and bundles them under a parent index file with the root element <sitemapindex>.
This split isn't arbitrary, it serves two practical purposes: first, crawlers process smaller files more reliably and without timeout risk; second, on a subsequent check Google can fetch only the part file whose lastmod values changed, instead of re-parsing the entire catalog every time. In Magento's configuration under Stores > Configuration > Catalog > XML Sitemap, the split threshold can be tuned even more granularly than the protocol limit via the "Maximum No of URLs Per File" and "Maximum File Size" fields in the Generation Settings group, though never beyond it.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Index file referencing per-entity sitemap parts, each under the 50,000 URL / 50MB limit -->
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://mironsoft-shop.com/sitemap/sitemap-category-1.xml</loc>
<lastmod>2026-07-08</lastmod>
</sitemap>
<sitemap>
<loc>https://mironsoft-shop.com/sitemap/sitemap-product-1.xml</loc>
<lastmod>2026-07-08</lastmod>
</sitemap>
<sitemap>
<loc>https://mironsoft-shop.com/sitemap/sitemap-product-2.xml</loc>
<lastmod>2026-07-08</lastmod>
</sitemap>
<sitemap>
<loc>https://mironsoft-shop.com/sitemap/sitemap-page-1.xml</loc>
<lastmod>2026-07-01</lastmod>
</sitemap>
</sitemapindex>
3. Priority and changefreq: why Google ignores them, but lastmod counts
Google has repeatedly confirmed publicly that <changefreq> and <priority> carry little practical weight anymore. Both the official Search Central documentation and statements from Google staff such as John Mueller and Gary Illyes have said, in essence, that Googlebot determines crawl frequency and page importance from its own signals, such as observed change behavior, internal linking, and historical traffic relevance, and largely disregards the self-declared values in the sitemap. Spending time on fine-grained priority tuning therefore yields measurably little SEO benefit.
<lastmod> is a different story: when the value is reliable and demonstrably accurate, Google actively uses it to prioritize recrawls, allowing changed pages to be reindexed faster. The critical catch: as soon as Google detects that lastmod is being set incorrectly on a systematic basis, for instance because every generation run simply inserts the current date instead of the real change date, the field gets ignored outright. For Magento stores this means lastmod should only be updated on genuine content changes such as price, stock, or description text, not on every cron run.
4. Configuring Magento's built-in sitemap generation
Magento ships sitemap generation as a core feature, configurable under Stores > Configuration > Catalog > XML Sitemap. The Category Options, Product Options, and Page Options groups each define their own changefreq and priority defaults via the config paths sitemap/category/changefreq, sitemap/category/priority, sitemap/product/changefreq, sitemap/product/priority, sitemap/page/changefreq, and sitemap/page/priority. Even though Google largely ignores these values, they cost nothing to set and tend to carry somewhat more weight with other crawlers like Bing, so a rough, plausible configuration still makes sense.
For product images, sitemap/product/image_include, with the values "All", "Base Only", or "No Images", controls whether and how many images per product get embedded as an <image:image> extension. The Generation Settings group controls whether automatic generation is enabled (sitemap/generate/enabled), what time it starts, how often it runs, and which email address gets notified on errors. These settings are configurable per store view, which is mandatory for multi-store setups with different base URLs.
5. The cron job and on-demand generation in practice
The actual generation is handled by the sitemap_generate cron job, defined in the Magento_Sitemap module's crontab.xml and run in the "default" cron group. For it to run at all, Magento's cron scheduler must be active and invoked regularly via bin/magento cron:run, typically as a systemd timer or crontab entry running every minute in production. Without a running cron scheduler, no sitemap is ever generated automatically, regardless of what's configured under Generation Settings.
For immediate generation without waiting for the next cron run, Magento provides a management interface under Marketing > SEO & Search > Site Map with a "Generate" action per configured sitemap entry. Important: a sitemap entry with filename, path, and store view must be created there once before either automatic or manual generation can take effect. Alternatively, generation can be triggered directly via CLI, which is useful for deployment scripts after large catalog imports.
# Run Magento's default cron group, which includes the sitemap_generate job
bin/magento cron:run --group="default"
# Trigger sitemap generation directly via CLI, bypassing cron scheduling
bin/magento sitemap:generate
# Definition of the built-in job, shipped in the Magento_Sitemap module
# vendor/magento/module-sitemap/etc/crontab.xml
# <job name="sitemap_generate" instance="Magento\Sitemap\Cron\Generate" method="execute">
# <schedule>0 2 * * *</schedule>
# </job>
# Confirm the job actually ran and check for generation errors
bin/log system.log | grep sitemap
6. Submission: Search Console, Bing Webmaster Tools, and robots.txt
A generated sitemap isn't automatically discovered by search engines, it has to be actively referenced. In Google Search Console this happens under Indexing > Sitemaps, where the relative path to the sitemap file (such as sitemap.xml) is entered and submitted for the verified property. The status then shows whether the file was fetched successfully and how many URLs were discovered. Important: Google officially retired the old ping-based submission via a direct URL in June 2023, so submission today runs exclusively through the Search Console interface or the corresponding API.
In Bing Webmaster Tools, submission works analogously through the Sitemaps section, or alternatively an already verified Google Search Console account can be imported directly, letting Bing automatically pick up the same sitemap URLs. Additionally, every sitemap should be referenced via the Sitemap: directive in robots.txt. This is the only mechanism through which even lesser-known crawlers can discover the sitemap independently, without manual account setup, and it works regardless of verification status in any Search Console property.
# robots.txt served at the store's document root
User-agent: *
Disallow: /catalogsearch/
Disallow: /checkout/
Disallow: /customer/
Allow: /
# Point every crawler to the sitemap index, no manual submission required
Sitemap: https://mironsoft-shop.com/sitemap.xml
7. Image and hreflang annotations for multi-store setups
Through the extension xmlns:image="http://www.google.com/schemas/sitemap-image/1.1", one or more <image:image> nodes with <image:loc> and optionally <image:title> can be added to each <url> entry. For product catalogs this boosts visibility in Google Image Search on top of regular web search, controlled by the already-mentioned sitemap/product/image_include setting.
For multi-store Magento installations with multiple languages, each store view generates its own independent sitemap file with its own base URL by default, without the language versions referencing each other. For such cases, Google recommends <xhtml:link rel="alternate" hreflang="..."> annotations directly inside the sitemap, as an alternative to hreflang tags in the HTML head. Magento's core doesn't offer this natively, it requires a plugin on the sitemap item provider that resolves the matching store-view counterparts for each URL via the URL rewrite table and injects them as additional nodes.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Extended namespaces for image and multi-language (hreflang) annotations -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://mironsoft-shop.com/en/women/dresses/summer-dress-blue.html</loc>
<lastmod>2026-07-08</lastmod>
<!-- Product image included per the sitemap/product/image_include setting -->
<image:image>
<image:loc>https://mironsoft-shop.com/media/catalog/product/s/u/summer-dress-blue.jpg</image:loc>
<image:title>Summer Dress Blue</image:title>
</image:image>
<!-- Alternate language versions of the same product, one per store view -->
<xhtml:link rel="alternate" hreflang="en" href="https://mironsoft-shop.com/en/women/dresses/summer-dress-blue.html"/>
<xhtml:link rel="alternate" hreflang="de" href="https://mironsoft-shop.com/de/damen/kleider/sommerkleid-blau.html"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://mironsoft-shop.com/en/women/dresses/summer-dress-blue.html"/>
</url>
</urlset>
8. Common XML sitemap mistakes in Magento
The most common mistake is a sitemap that contains URLs that shouldn't be indexed at all: products with "Not Visible Individually" visibility, old URLs redirected after a relaunch, or pages with a noindex meta tag end up unfiltered in the generated file when the underlying product and category flags aren't maintained cleanly. This dilutes the sitemap's usefulness in Search Console, where Google compares indexed URL coverage against the submitted sitemap.
A second classic mistake is inconsistency between the base URL used in the sitemap and the page's canonical URL, for example mixing www and non-www variants or HTTP and HTTPS. This often happens when web/unsecure/base_url and web/secure/base_url don't consistently point to the same host. Third, in multi-store setups it's often forgotten to create a separate sitemap entry with its own base URL for every store view, causing non-English stores to end up with English URLs in their sitemap by mistake. Fourth, lastmod often stays stale for weeks after large catalog imports if the cron job doesn't run again promptly afterward.
9. Manual vs. automated sitemap maintenance compared
The table below compares typical mistakes from manual or poorly configured sitemap maintenance against correct practice supported by Magento's built-in generation.
| Aspect | Common mistake | Correct approach |
|---|---|---|
| File size | A single file with 80,000+ URLs | Sitemap index with multiple files, max. 50,000 URLs / 50 MB each |
| lastmod | Set to the current date on every cron run | Updated only on genuine content changes |
| priority / changefreq | Elaborate per-URL fine-tuning | Rough, plausible defaults per entity type are enough |
| robots.txt | Sitemap referenced nowhere | Sitemap: directive plus Search Console submission |
| URLs included | Noindex and redirected URLs included | Only indexable 200-OK URLs with a correct canonical |
In practice these issues reinforce each other: an overloaded, error-ridden sitemap with wrong lastmod values and non-indexable URLs loses Google's trust, which can also weaken the effect of correctly set lastmod values on other, clean pages of the same catalog. Configuring Magento's built-in tools correctly and keeping the cron job running reliably avoids most of these mistakes automatically.
Mironsoft
XML sitemaps, technical SEO, and Magento configuration from one team
Ready to get your sitemap structure right?
We review your Magento store's sitemap configuration, set up cron-based generation cleanly, and make sure submission to Google and Bing is correct, including multi-store and hreflang setup.
Sitemap audit
Reviewing URL coverage, lastmod accuracy, and index structure
Magento configuration
Setting up cron job, generation settings, and multi-store base URLs correctly
Submission & monitoring
Correctly linking Search Console, Bing Webmaster Tools, and robots.txt
10. Summary
XML sitemaps for Magento stores solve a fundamental technical problem: they give search engines a complete, structured list of every indexable URL, instead of relying solely on internal link-based crawling. The sitemap standard with urlset, loc, lastmod, changefreq, and priority is simple, but the individual fields differ sharply in impact: priority and changefreq are largely ignored by Google, while a reliably maintained lastmod actively feeds into recrawl prioritization.
Magento's built-in sitemap generation via Stores > Configuration > Catalog > XML Sitemap, the sitemap_generate cron job, and the on-demand interface under Marketing > SEO & Search > Site Map fully covers the core functionality. Splitting large catalogs correctly with sitemap index files, referencing the sitemap in robots.txt, and adding image and hreflang annotations for multi-store setups on top of that ensures Google and Bing can reliably find and keep the entire catalog up to date.
XML Sitemaps for Magento Stores - The Essentials at a Glance
Follow the structure
loc is mandatory and must match the canonical URL. Max. 50,000 URLs / 50 MB per file, otherwise use a sitemap index.
Maintain lastmod, not priority
changefreq/priority are largely ignored by Google. Only update lastmod on genuine content changes.
Use Magento's built-in tools
Configuration under Catalog > XML Sitemap, the sitemap_generate cron job, on-demand under Marketing > SEO & Search.
Submit correctly
Use Search Console, Bing Webmaster Tools, and the Sitemap: directive in robots.txt together.