Configuring XML SItemap for your Magento 2 website you help Google identify, crawl and analyze your website links better. Google ranks not only the website as the unity of pages but separate web pages as well. So having an XML sitemap on your website contributes to your SEO improvements. You can easily configure the XML sitemap for your Magento 2 store manually. However, you can as well configure the Magento 2 XML sitemap autogeneration.

So, in this article you will learn:

How to configure Magento 2 Sitemap?
How to configure Magento 2 Sitemap Auto-generation?

How to configure Magento 2 Sitemap?

In order to configure XML sitemap in Magento 2 take the following steps:

1. Go to Marketing > Seo & Search > Site Map

Magento 2 XML Sitemap Configuration

2. Choose an existing sitemap to edit or if you don't have any XML sitemap yet press the Add Sitemap button.

Magento 2 XML Sitemap Configuration

3. Set the name of the XML file of the sitemap in the Filename field, enter the Path where it will be located and press the Save & Generate button.

Magento 2 XML Sitemap Configuration, New Site Map

Once you have finished you'll see the list of Sitemaps.

4. Press Generate a link to generate the XML Sitemap file. Note that a sitemap file is updated automatically by cron, you need to press "Generate" only if you want to update/generate Sitemap XML instantly.

Magento 2 XML Sitemap List

A standard Magento 2 XML Sitemap consists of links for products, categories, static pages, and product images.

How to configure Magento 2 Sitemap Auto-generation?

In order to set Magento XML Sitemap to be generated automatically by Cron please go to Stores > Configuration > Catalog > XML Sitemap and find the Generation Settings section.

Magento 2 XML Sitemap Autogeneration

In Generation Settings, you have to Enable the autogeneration and set the Time and Frequency you want it to be generated at. We strongly recommend you to set it to be generated daily and at night time. In case something might go wrong and you want to be notified, set the Error Email Recipient, the Error Email Sender, and Error Email Template can have the default values.

Magento 2 XML Sitemap Auto-generation

Once you have finished don't forget to press the Save button.

Magento 2 XML Sitemap Configuration Save

In case you want to see how it is done, check out this short video: