Magento 2 Sitemap Guide: How to Configure, Generate & Submit

Magento 2 Sitemap Guide: How to Configure, Generate & Submit

A sitemap in Magento 2 helps search engines like Google discover and index your store’s key pages — products, categories, and content. Without it, important pages may remain hidden, hurting your visibility.

In this guide, you’ll learn how to configure, generate, and submit a sitemap in Magento 2, plus advanced settings and SEO tips to maximize your store’s search performance.

What is Sitemap in Magento 2 and Why You Need It?

When running an online store with Magento 2, one of the most important SEO tools you can use is a sitemap. A sitemap is essentially a roadmap of your website that lists important pages such as products, categories, and CMS pages. It helps search engines like Google and Bing efficiently crawl and index your site, while also improving navigation for users.

Magento 2 Sitemaps play a crucial role in optimizing large and complex stores. Here’s why they’re important:

  • Better SEO & Indexing: Ensures search engines can find and rank all your pages.
  • Avoids Orphan Pages: Prevents important product or content pages from being missed.
  • Supports Large Catalogs: Makes it easier for search engines to navigate thousands of products.
  • Improves Ranking & Visibility: Structured data increases your chances of appearing in search results.

XML vs HTML Sitemap: What’s the Difference?

Magento 2 deals with two types of sitemaps, but it’s crucial to understand their distinct roles and what Magento supports natively.

In short: XML sitemaps in Magento 2 are vital for SEO, while HTML sitemaps improve user navigation. Ideally, a Magento 2 store should have both to maximize visibility and usability.

How to Configure Magento 2 XML Sitemap

In Magento 2, the XML sitemap is configured in the Admin panel:

How to Configure Magento 2 XML Sitemap:

  1. Go to Stores > Configuration > Catalog > XML Sitemap
  2. Configure the frequency and priority for indexing categories under the Categories/Product/CMS Pages/URL Options section.
Configure Magento 2 XML Sitemap Categories/Product/CMS Pages/URL Options section
  1. Choose whether to include product images in the sitemap.
  2. Configure the General XML Sitemap Settings:
    • Enable automatic sitemap generation.
    • Set the update frequency and start time for when the XML sitemap should be refreshed.
    • Enter the error email recipient to receive notifications if issues occur during sitemap updates.
    • Choose the error email sender and template to be used for sitemap error notifications.
  1. Configure the Magento Sitemap File Limits.
    • In the Maximum Number of URLs per File field, specify how many URLs each sitemap can contain.
    • In the Maximum File Size field, define the maximum allowed size for each sitemap file.
  2. Enable the Submission to Robots.txt option to automatically add sitemap information to your robots.txt file, helping search engines crawl and index your site more effectively

How to Generate Your Sitemap in Magento 2

Magento 2 makes it simple to create and manage XML sitemaps right from the Admin panel—no coding required. Generating a sitemap ensures that search engines can properly crawl and index your store, boosting visibility in search results.

Here’s how you can set it up:

How to Generate Your Sitemap in Magento 2:

  1. In the Admin Panel, go to:  Marketing > SEO & Search > Site Map.
  2. Click Add Sitemap (or New Site Map depending on your version).
  3. Fill in the form:
    • Filename: Typically sitemap.xml
    • Path: The server directory where the sitemap will be stored (commonly / or your Magento root directory /)
    • Store View: Choose the store view you want the sitemap to apply to.
  4. Click Save & Generate.
How to Generate Your Sitemap in Magento 2

That’s it! Magento will create your sitemap file and place it in the directory you specified. Once generated, you can open the file in your browser (e.g., https://yourstore.com/sitemap.xml) to verify it contains your products, categories, and CMS pages.

How to Submit Magento 2 Sitemap to Google Search Console

Generating the sitemap in Magento 2 is only half the battle. You need to tell Google it exists.

How to Submit Your Sitemap to GSC:

  1. Log in to your Google Search Console account.
  2. In the left menu, go to Indexing > Sitemaps.
  3. Under Add a new sitemap, enter the URL of your sitemap (e.g., sitemap.xml).
  4. Click Submit.
How to Submit Magento 2 Sitemap to Google Search Console

Google will now crawl and process your sitemap. The status will initially show as “Couldn’t fetch” or “Processing” and should change to “Success” within a day or so.

Feeling overwhelmed? Let our experts handle your Magento 2 sitemap configuration and submission.Get in touch with us today.

Advanced Sitemap Settings in Magento 2

Once you’ve configured and submitted your sitemap, you’ll want to fine-tune a few advanced settings. These options are especially important for large stores, frequent product updates, or when you need more control over how search engines crawl your site.

Magento 2 provides three powerful features to help with this:

Automatic Updates

By default, Magento doesn’t instantly refresh your sitemap every time you add or remove a product, category, or CMS page. Instead, you have two options:

  • Schedule automatic updates → In the XML Sitemap settings, you can set Magento to regenerate the sitemap daily, weekly, or monthly.
  • Manual refresh → You can manually generate a new sitemap whenever needed (e.g., after a big catalog update).

If your sitemap isn’t updated, Google may not see new products or important changes. Scheduling daily updates is best for larger catalogs or stores with frequent changes.

Index Sitemaps for Large Stores

Google sets strict limits for each sitemap file:

  • 50,000 URLs maximum, or
  • 50 MB file size (uncompressed)

If your Magento store has more pages than this, you don’t need to worry. Magento automatically splits your sitemap into multiple smaller files and creates a sitemap index file (e.g., sitemap.xml) that links to all the smaller files. This way, you only need to submit the index sitemap to Google Search Console, and it will discover the rest. Large catalogs with tens of thousands of products stay fully crawlable and compliant with Google’s rules.

Priority Settings

Magento lets you assign priority values to different page types in your sitemap. This tells search engines which pages are the most important:

  • Categories → usually high (e.g., 0.8) because they structure your store.
  • Products → medium (e.g., 0.5–0.7) since there may be thousands.
  • CMS Pages (About Us, Contact, Blog) → high (e.g., 0.8–1.0) if they’re key landing pages.

You can configure these under:
Stores > Configuration > Catalog > XML Sitemap > Categories / Products / CMS Pages Options

Priorities help Google focus its crawl budget on the pages that matter most for traffic and conversions.

Your Sitemap is Submitted. What’s Next?

Congratulations! You’ve successfully configured, generated, and submitted your sitemap. You’ve given search engines a clear roadmap to all the important pages on your store.

But the map is just the beginning. The next step is to ensure that when Google crawls these pages, it finds a fast, authoritative, and engaging site that deserves to be at the top of the search results. Here are three key areas to focus on to turn your indexed pages into powerful traffic drivers.

1. Make Your Listings Stand Out

Rich Snippets are extra details (ratings, price, availability) that appear in Google search results. They make your product listings more attractive than plain blue links. Without rich snippets, your products may get lost in crowded search results, leading to fewer clicks.

The dedicated Rich Snippets Extension for Magento 2 automatically adds structured data to your pages. This tells Google exactly what your products are, making them eligible for rich snippets — no coding required.

2. Rank Higher with Faster Load Times

Page speed is how quickly your store loads. Google uses it as a ranking factor, and users expect fast websites.  A slow store wastes Google’s crawl budget, which means fewer pages get indexed. It also drives customers away, increasing bounce rates and lost sales.

Google Page Speed Optimizer for Magento 2 speeds up images, code, and caching — boosting SEO and user experience.

3. Control Duplicate Content

Layered navigation lets customers filter products (by color, size, brand). But in Magento, these filters often create endless URL variations. Duplicate or messy URLs confuse search engines and weaken your SEO.

With the Layered Navigation Extension, you get clean, SEO-friendly URLs and control over how filters are indexed. This protects your site from duplicate content issues while giving customers a smoother shopping experience.

Your sitemap is the foundation of Magento 2 SEO. It helps search engines discover your pages — but extensions like Rich Snippets, Page Speed Optimizer, and Layered Navigation ensure those pages are click-worthy, fast, and index-friendly.

Frequently Asked Questions (FAQ)

Does Magento 2 automatically generate a sitemap?

Yes. Magento 2 includes a built-in feature to generate an XML sitemap automatically. You can configure the update frequency, file limits, and even enable automatic submission to robots.txt from the Admin Panel. However, you still need to submit your sitemap URL manually in Google Search Console so search engines know where to find it.

How often should I update my sitemap?

Your sitemap should be updated whenever there are changes to your store’s structure or content — such as new products, categories, or CMS pages. In Magento 2, you can schedule automatic sitemap generation (daily, weekly, or monthly) so it stays up to date without manual work. For larger catalogs, a daily refresh is recommended.

Do I need both XML and HTML sitemaps?

  • XML Sitemap: Built for search engines. It’s essential for indexing and ranking, and Magento 2 supports it natively.
  • HTML Sitemap: Built for users. It helps visitors navigate your store, but Magento 2 does not provide it by default. You would need a third-party extension if you want one.

XML sitemaps are mandatory for SEO, while HTML sitemaps are optional but helpful for user experience.

About The Author: Anna Vyhura

An enthusiastic writer exploring the ever-evolving SEO landscape, with a focus on creating insightful content pieces. Inspired by meaningful conversations and playing sports View more posts