How to Create an XML Sitemap in Magento 2 Stores

Last Updated on Jun 1, 2026 by Nurul Afsar

“`html

If you run a Magento 2 store, getting your pages discovered by search engines is essential for improving organic visibility, crawlability, and ecommerce SEO performance. One of the simplest ways to support this is by creating an XML sitemap in Magento 2.

A Magento 2 XML sitemap tells Google and other search engines which product pages, category pages, CMS pages, and important store URLs should be crawled. It also helps search engines understand how often your content changes and which pages are most important.

The good news is that Magento 2 includes built-in XML sitemap functionality, so you do not need an extension to get started. In this guide, we will walk through how to configure, generate, verify, and submit a Magento 2 sitemap step by step.

Need Help With Magento 2 SEO?

If your Magento sitemap is not generating correctly, your URLs are not being indexed, or your store needs a deeper SEO review, Numinix can help.

Our team supports Magento development, ecommerce SEO, technical troubleshooting, and ecommerce consulting for online stores that need cleaner crawlability, better indexing, stronger performance, and improved organic visibility.

Magento Development Services Ecommerce SEO Services Ecommerce Consulting Services

What Is a Magento 2 XML Sitemap?

An XML sitemap is a file that lists the important URLs on your website. For Magento 2 stores, this usually includes product pages, category pages, CMS pages, and other indexable ecommerce URLs.

When you submit a sitemap to Google Search Console, you give search engines a clearer roadmap of your Magento store. This is especially useful for ecommerce websites with large catalogs, changing inventory, seasonal product collections, multiple store views, or pages that may not always be easy to discover through internal links alone.

A properly configured Magento 2 sitemap does not guarantee rankings by itself, but it plays an important role in technical SEO because it helps search engines find and process your store pages more efficiently.

Why XML Sitemaps Matter for Magento 2 SEO

Magento stores often contain hundreds or thousands of URLs across products, categories, CMS pages, images, filtered navigation, and store views. Without a clean XML sitemap, search engines may take longer to discover new pages, revisit updated content, or understand which URLs should be prioritized.

A well-structured Magento XML sitemap can help:

  • Improve discovery of important Magento product pages, category pages, and CMS pages
  • Help Google understand which ecommerce URLs should be crawled
  • Support faster indexing for new or updated products
  • Make large Magento catalogs easier for search engines to process
  • Reduce the risk of important pages being missed during crawling
  • Strengthen your Magento technical SEO foundation

For online stores that depend on organic traffic and product visibility, XML sitemap setup should be part of a larger ecommerce SEO strategy.

Step 1: Configure XML Sitemap Settings in Magento 2

Before generating your sitemap, configure how Magento handles sitemap frequency, priority, file limits, image inclusion, and automatic generation.

Log in to your Magento 2 Admin Panel and go to:

Stores > Configuration > Catalog > XML Sitemap

You will see several expandable sections. Each section controls a different part of your Magento 2 sitemap configuration.

Categories Options

The Categories Options section controls sitemap settings for Magento category pages. You can set:

  • Frequency: How often category pages are likely to change
  • Priority: A value between 0.0 and 1.0 that indicates relative importance

For many Magento 2 stores, a weekly frequency and a priority between 0.5 and 0.7 is a reasonable starting point. Stores that frequently update categories, promotions, or seasonal collections may choose a more frequent update schedule.

Products Options

The Products Options section controls sitemap settings for Magento product pages. Product pages are usually among the most important URLs in an ecommerce store, so they should typically be included in your XML sitemap unless there is a specific SEO reason to exclude them.

You can configure product frequency, product priority, and product image inclusion. For most Magento stores, including product images as Base Only is a practical choice because it includes the main product image without making the sitemap unnecessarily large.

This is especially helpful for stores that rely on product visibility in organic search, Google Images, or shopping-related search results.

CMS Pages Options

The CMS Pages Options section controls static pages such as your homepage, About Us page, Contact page, shipping policy, return policy, landing pages, and other Magento CMS content.

Set frequency and priority based on how often those pages are updated. For example, a frequently updated landing page or SEO content page may deserve a higher change frequency than a static policy page.

Generation Settings

The Generation Settings section controls automatic sitemap regeneration. Magento can regenerate your XML sitemap daily, weekly, or monthly using cron.

You can also add an error email recipient so Magento can notify you if sitemap generation fails. This is useful for larger Magento stores, stores with frequent product updates, or businesses that rely heavily on search visibility.

If your sitemap does not update automatically, your cron configuration may need to be reviewed by a Magento developer.

Sitemap File Limits

Magento lets you control the maximum number of URLs per sitemap file and the maximum file size. If your catalog is large, Magento can split your sitemap into multiple files automatically.

This helps keep your sitemap manageable and reduces the chance of sitemap errors caused by oversized files. Large ecommerce stores should review this section carefully to make sure their sitemap structure remains clean and search engine friendly.

Search Engine Submission Settings

This section lets you add your sitemap URL to your robots.txt file. Enabling this setting helps search engines discover your Magento 2 XML sitemap automatically.

After reviewing and updating all sitemap settings, click Save Config.

Step 2: Generate the Magento 2 Sitemap File

After your XML sitemap settings are configured, you can generate the actual sitemap file from the Magento Admin Panel.

Go to:

Marketing > SEO & Search > Site Map

Click Add Sitemap. In some Magento versions, this may appear as New Site Map.

You will need to complete the following fields:

  • Filename: Enter the name of the XML file, such as sitemap.xml.
  • Path: Enter the directory where the sitemap should be stored. For most stores, use / so the sitemap is available at yourdomain.com/sitemap.xml.
  • Store View: Select the store view the sitemap applies to. Multi-store Magento websites may need separate XML sitemaps for different store views.

Once the fields are complete, click Save & Generate. Magento will create the sitemap file and display it in the sitemap grid with a generation timestamp and direct sitemap link.

If your Magento sitemap fails to generate, produces errors, or does not include the right URLs, request a custom quote from Numinix for Magento troubleshooting and technical SEO support.

Step 3: Verify Your Magento Sitemap

After the sitemap is generated, open your browser and visit:

https://yourdomain.com/sitemap.xml

You should see a structured XML file containing your Magento store URLs. Depending on your configuration and catalog size, you may see a sitemap index file that links to multiple individual sitemap files.

If the sitemap does not load, check the following:

  • The sitemap file path was entered correctly
  • The sitemap file exists on the server
  • Server permissions allow the file to be accessed publicly
  • Your Magento base URL and store view settings are correct
  • Cron is running properly if you rely on automatic regeneration
  • No custom module or extension is interfering with sitemap generation

Verification is important because a sitemap that exists inside Magento but cannot be accessed publicly will not help search engines crawl your store.

Step 4: Submit Your Magento 2 XML Sitemap to Google Search Console

Once your sitemap is working, submit it to Google Search Console so Google can process it directly.

Log in to Google Search Console, choose your website property, and go to:

Indexing > Sitemaps

Enter your sitemap URL, such as sitemap.xml, and click Submit.

Google will begin processing the sitemap and reporting its status. Over time, you can use Google Search Console to monitor discovered URLs, indexing issues, crawl errors, and page coverage.

If Google reports sitemap errors, review the affected URLs carefully. Sitemap issues may point to deeper Magento SEO problems such as broken URLs, redirects, blocked pages, duplicate content, incorrect canonical tags, or pages that should not be indexed.

Step 5: Keep Your Magento 2 Sitemap Updated

Your Magento 2 XML sitemap should stay current as your store changes. New products, removed products, updated categories, revised CMS pages, and seasonal landing pages should all be reflected in your sitemap.

If automatic generation is configured correctly, Magento can regenerate your sitemap on a recurring schedule through cron. This reduces the need for manual updates and helps search engines stay aware of your latest ecommerce content.

To manually refresh a sitemap, return to:

Marketing > SEO & Search > Site Map

Then click Generate next to the sitemap you want to update.

For stores with frequent catalog changes, automatic sitemap regeneration is especially important. A stale sitemap can slow down discovery of new products or continue pointing search engines toward outdated URLs.

When Should You Use a Magento Sitemap Extension?

Magento’s built-in XML sitemap tool is a solid starting point for many stores. However, some Magento websites may need more advanced sitemap control, especially if they have complex catalogs, custom content types, or multi-store configurations.

You may want to consider a Magento sitemap extension if your store has:

  • A very large product catalog
  • Multiple store views, languages, or regional storefronts
  • Advanced image sitemap requirements
  • Specific URL exclusion rules
  • Custom CMS, blog, or landing page structures
  • More granular control over sitemap priority and frequency
  • Indexation issues caused by duplicate or low-value URLs

Extensions can offer more flexibility, but they should be reviewed carefully before installation. Poorly configured sitemap extensions can create duplicate URLs, unnecessary sitemap bloat, crawling waste, or indexing confusion.

Important: Before installing any Magento sitemap extension, confirm that it is compatible with your Magento version, theme, custom modules, server environment, and existing SEO setup.

Common Magento 2 XML Sitemap Mistakes to Avoid

Creating a sitemap is straightforward, but Magento stores can still run into SEO issues if the sitemap is not configured properly. Avoid these common mistakes:

  • Submitting a sitemap that includes redirected, broken, or non-indexable URLs
  • Leaving outdated products or removed categories in the sitemap
  • Including duplicate URLs from multiple store views without proper SEO handling
  • Forgetting to regenerate the sitemap after major catalog updates
  • Blocking sitemap URLs in robots.txt
  • Using an extension without checking compatibility or output quality
  • Assuming sitemap submission replaces proper internal linking

Your sitemap should support your Magento SEO strategy, not compensate for poor site architecture. Strong internal links, optimized category pages, clean product URLs, and proper indexation settings are still essential.

Why Work With Numinix for Magento SEO?

Generating a sitemap is only one part of Magento SEO. For stronger organic visibility, your store also needs clean URLs, optimized metadata, crawlable navigation, fast page speed, proper canonical tags, structured data, internal linking, indexation controls, and a technically sound ecommerce architecture.

Numinix works with ecommerce businesses to improve Magento stores from both a development and SEO perspective. That means we can look beyond your XML sitemap and identify technical issues that may be limiting visibility, performance, or revenue.

Our Magento and ecommerce SEO support can help with:

  • Magento 2 XML sitemap setup and troubleshooting
  • Magento technical SEO audits
  • Crawl and indexation issue reviews
  • Magento performance optimization
  • Internal linking and site architecture improvements
  • Product and category page SEO improvements
  • Custom Magento development and ecommerce consulting

Whether you need a simple Magento sitemap fix or a deeper technical SEO review, Numinix can help you improve how search engines crawl, understand, and index your ecommerce store.

Final Thoughts

Creating an XML sitemap in Magento 2 is one of the simpler technical SEO tasks, but it can have a meaningful impact on how search engines discover and understand your ecommerce store. A properly configured sitemap helps search engines find your important URLs, crawl your catalog more efficiently, and keep up with store updates.

For most Magento 2 stores, the built-in sitemap feature is enough to get started. Larger or more complex stores may benefit from a more customized approach, especially if they have multiple store views, advanced SEO requirements, custom modules, or indexing challenges.

If you want to pair a properly configured Magento 2 XML sitemap with a broader optimization strategy, explore Numinix ecommerce SEO services, get Magento development support, or book an ecommerce consulting session.

Disclaimer: Magento settings, menu labels, extension compatibility, sitemap behavior, and SEO requirements can vary depending on your Magento version, theme, server environment, custom modules, and installed extensions. Always review your store configuration carefully before making changes, and test updates in a staging environment when possible.

“`

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Account Cart Search Cart Open Menu Arrow Link Arrow Chat Close Close Popup Facebook Twitter Google Plus linkedin2

Get 10% Off!

your next purchase when you subscribe to our newsletter.

* indicates required

Intuit Mailchimp

By subscribing, you agree to our Terms of Use and Privacy Policy.