Skip to content
ZenoCloud Call

How to Configure Magento 2 Sitemap?

Complete guide to generating and configuring XML sitemaps in Magento 2 for better search engine indexing.

First written in 2022. Things may have changed since.

A small matte navy storefront with a scalloped awning and a gold door handle, on warm paper.

An XML sitemap helps search engines discover and index all pages on your Magento 2 store. Here's how to set it up correctly.

What is an XML Sitemap?

An XML sitemap is a file that lists all the URLs on your website. Search engines like Google use it to discover and crawl your pages more efficiently.

How to Configure Sitemap in Magento 2

  • Log in to your Magento 2 Admin panel
  • Go to Marketing > SEO & Search > XML Sitemap
  • Click "Add Sitemap"
  • Enter filename (usually sitemap.xml)
  • Select store view
  • Click Save

Generating the Sitemap

After creating the sitemap entry, Magento automatically generates it. You can also:

  • Use cron jobs for automatic generation
  • Generate manually in the admin panel
  • Use command line to trigger sitemap generation directly on your server using Magento's CLI tools

Sitemap Configuration Settings

  • Include products
  • Include categories
  • Include CMS pages
  • Change frequency
  • Priority settings

What Should Be Included

  • Product pages
  • Category pages
  • CMS pages
  • Blog pages
  • Exclude search results
  • Exclude duplicate URLs

What to Exclude

  • Checkout pages
  • Customer account pages
  • Search pages
  • Filter pages
  • Private pages

Submitting Your Sitemap to Search Engines

  • Google Search Console: Add sitemap URL
  • Bing Webmaster Tools: Submit sitemap
  • Add to robots.txt: Sitemap: your-sitemap-url

Monitoring Sitemap Performance

  • Check Search Console for crawl stats
  • Monitor indexation rates
  • Track coverage
  • Check for errors
Next step

Run Magento on infrastructure built for it.

See Magento hosting

Related services

Browse all field notes
Quote request

What should we quote?

Your name, number and what you need. We reply within one business day.