New website or upgrading an existing one? Book a free video consultation.
Englishen
Login Configurator

XML sitemap

An XML sitemap is a file with a list of addresses you want the search engine to crawl and index. It helps the search engine discover your pages faster - especially for larger stores, new pages, deeply nested pages, and pages with few internal links. A sitemap is not a guarantee of indexing, but it is one of the main ways to tell the search engine which pages matter. Below is what to include, which tags matter, and how to set it up in Magento.

Include only the right addresses

Only canonical, indexable addresses that you want to rank belong in the sitemap - those marked index and without a canonical tag pointing elsewhere. Leave out pages marked noindex, redirects, non-canonical variants, and addresses blocked in robots.txt. Quality over quantity applies: a clean sitemap with the right addresses is worth more than one bloated with duplicates, since it clearly shows the search engine what to crawl as a priority.

Which tags count

A sitemap can state several details for each address, but the search engine ignores most of them:

  • lastmod (the date of the last change) is the only field Google actually uses - but only if it is credible. It should reflect a real, content change to the page (content, structured data, links), not minor changes such as updating the year.
  • priority and changefreq are ignored by Google, because owners self-report them and are unreliable. Do not worry about them.

Images in the sitemap

You can also include the addresses of product images in the sitemap. This helps the search engine discover and index your images, which benefits display in image search - an additional source of traffic for the store.

Large stores: splitting and the sitemap index

A single sitemap may contain at most 50,000 addresses and at most 50 MB (uncompressed). When the store exceeds this, split the addresses into several smaller sitemaps and connect them through a sitemap index (a sitemap of sitemaps) that points to the individual files. It makes sense to separate sitemaps by content type (products, categories, content pages) so you can trace errors faster.

Multiple languages: hreflang in the sitemap

If you run the store in several languages (for example a Slovenian and an English version of the same products), hreflang tags tell the search engine which language version to show to which visitor. These links between versions can be added right into the sitemap, which helps the search engine discover all language versions faster and connect them correctly. Create a separate sitemap for each store or language.

How to set it up in Magento

Magento has built-in sitemap generation: in Stores > Configuration > Catalog > XML Sitemap, set the frequency and time of the refresh, the maximum number of addresses per file (for automatic splitting), the inclusion of product images, and the automatic addition of the link in robots.txt. The sitemap covers products, categories, and content (CMS) pages. Magento generates it per store view, so create separate sitemaps for the Slovenian and English stores. For hreflang links within the sitemap a dedicated SEO module is often required, since core Magento does not offer this option.

Submitting and measuring

When the sitemap is ready, submit it to Google Search Console (the Sitemaps report) and include a link to it in robots.txt. In the report track the status: how many addresses are submitted and how many are actually indexed, and any errors (for example addresses with an error or redirects in the sitemap). The goal is not just that the sitemap exists, but that it contains only the right addresses and that those get indexed.

Sources

Frequently Asked Questions

What is an XML sitemap and what does it give me?

It is a file with a list of addresses you want the search engine to crawl and index. It helps the search engine discover your pages faster, especially for larger stores, new pages, deeply nested pages, and pages with few internal links. A sitemap is not a guarantee of indexing, but it is one of the main ways to tell the search engine which pages matter.

Which pages should I include in the sitemap?

Only canonical, indexable addresses that you want to rank - those marked index and without a canonical tag pointing elsewhere. Leave out pages with noindex, redirects, non-canonical variants, and addresses blocked in robots.txt. Quality over quantity applies: a clean sitemap with the right addresses is worth more than one bloated with duplicates, since it clearly shows the search engine what to crawl as a priority.

Do the lastmod, priority, and changefreq fields matter?

Only lastmod (the date of the last change) matters - Google uses it, but only if it is credible; it should reflect a real content change to the page, not a minor one (such as updating the year). The priority and changefreq fields are ignored by Google, because owners self-report them and they are unreliable, so there is no need to worry about them.

How do I handle a large store and multiple languages?

A single sitemap may contain at most 50,000 addresses and at most 50 MB uncompressed; when you exceed this, split the addresses into several smaller sitemaps and connect them through a sitemap index (a sitemap of sitemaps). It makes sense to separate sitemaps by content type (products, categories, content pages). If you run the store in several languages, hreflang tags tell which language version to show, and these links can be added right into the sitemap; create a separate sitemap for each language.

How do I set this up in Magento and submit it?

In Stores > Configuration > Catalog > XML Sitemap, set the frequency and time of the refresh, the maximum number of addresses per file (for automatic splitting), the inclusion of product images, and the addition of the link in robots.txt; the sitemap covers products, categories, and content pages. Magento generates it per store view, so create separate sitemaps for the Slovenian and English stores; for hreflang links in the sitemap a dedicated SEO module is often required. When it is ready, submit it to Google Search Console (the Sitemaps report) and track in the report how many addresses are indexed and any errors.

Stop browsing. Start selling. Contact me now at anze@degriz.net.

Access Premium Content for Free

Subscribe to our newsletter and get free access to premium content. Discover valuable insights and exclusive resources available only to our subscribers.

Privacy Policy: Newsletter Subscription

By entering your email address, you are subscribing to the newsletter, through which Degriz will inform you about new online and in-store offerings, marketing activities, and other promotions.

By subscribing to the newsletter, you are also enrolled in the benefits database that Degriz offers to its users.

For the newsletter subscription, Degriz d.o.o. collects the following information: email address, IP address, and if you subscribe as a registered member, your name, surname, address, and phone number.

After submitting the form with your email address, you will receive a confirmation message at the specified address – by confirming this, you will be subscribed to the Degriz newsletter until you unsubscribe (so-called opt-in approval). You can request, in writing or by clicking the Unsubscribe button in the newsletter, that the data controller permanently or temporarily stops using your personal data for direct marketing purposes. Your request will be fulfilled within 15 days of receiving it, as prescribed by law. You can also request the transfer or access to your data.

Degriz d.o.o. is committed to protecting your data in accordance with the legislation governing personal data protection.

The sender of the newsletter and controller of your personal data is: Degriz, d.o.o., Gorica pri Šmartnem 45a, 3000 Celje, SI 67287743

Check out the full Privacy Policy

Newsletter

My name is Anže, and I am a Magento certified expert in solutions and a creator of multiple award-winning online stores.

I am the architect behind all Degriz projects. You will surely come across me if we collaborate. Even though the phone keeps ringing, you can always tap me on the shoulder if you need advice regarding online stores and their functioning.

I specialize in building custom online stores and I am a master of unique techniques to enhance conversion on your website.

© 2010 - 2026 Degriz. All rights reserved. Built with love on Magento.
Partial use of the content is permitted with mandatory attribution. The content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0) or under our own license.