Magento 2 XML Sitemap is a file where you provide all info about the pages and images on your site, allowing search engines to read and crawl your site more efficiently.

XML Sitemap improves the way your website is indexed by search engines. It's is designed to find pages that might be overlooked by web crawlers.

You can configure Magento 2 XML Sitemap to submit all your pages and images to search engines.

Follow the steps below to configure XML Sitemap in Magento 2:

Step 1: Access Settings

log in to the admin panel, and go to Stores > Settings > Configuration.

Expand Catalog and choose XML Sitemap, and configure each section.

Step 2: Categories, Products, CMS Pages, Store URL Settings

By default the "Use system value" is checked, you can clear it on each option to change the setting.

In the Categories Options section:

Frequency: choose how frequently each category page is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, or Never

Priority: enter the priority of each category URL relative to other URLs on your site. Enter a value between 0.0 and 1.0. Zero has the lowest priority.

Sitemap categories config

In the Products Options section:

Frequency: choose how frequently each product page is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, or Never

Priority: enter the priority of each product URL relative to other URLs on your site. Enter a value between 0.0 and 1.0. Zero has the lowest priority.

Add Images into Sitemap :

  • if "None" is selected, no product images will be included in the XML sitemap
  • if "Base Only" is selected, the base image of each product will be included in the XML sitemap
  • if "All" is selected, all existing product images will be included in the XML sitemap

Sitemap products config

In the CMS Pages Options section:

Frequency: choose how frequently each CMS Page is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, or Never

Priority: enter the priority of each CMS Page URL relative to other URLs on your site. Enter a value between 0.0 and 1.0. Zero has the lowest priority.
[image]

Sitemap CMS pages config

In the Store URLs Options section:

Frequency: choose how frequently each store URL is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, or Never

Priority: enter the priority of each store URL relative to other URLs on your site. Enter a value between 0.0 and 1.0. Zero has the lowest priority.

Sitemap store URL config

Step 3: Generation Settings

In this section, you can configure the XML sitemap to auto-generate at a specified time and send an error report to the specified recipient.

Enabled: set this field to "Yes", to enable automatically generate XML sitemap, or set it to No, to disable this feature.

Frequency: choose how frequently the XML sitemap will be auto-generated: Daily, Weekly, or Monthly

Error Email Recipient: enter the email address of the person who is to receive notification if an error occurs during an XML Sitemap generation.

Error Email Sender: choose the store contact to use as the sender of the XML Sitemap error notification.

Error Email Template: choose the email template to use for the XML Sitemap error notification.

Sitemap generate config

Step 4: File Limits Settings

Maximum No of URLs per File: enter the maximum number of URLs that can be included in the XML sitemap. By default, the limit is 50,000.

Maximum File Size: enter the largest size in bytes that are allocated for the XML sitemap. The default size is 10,485,760 bytes.

Sitemap limit config

Step 5: Robots Settings

In the Search Engine Submission Settings section, set "Enable Submission to Robots.txt" to Yes to provide instructions to search engines that crawl your site via the robots.txt.

If you do not use robots.txt or you do not want to auto-submit your XML sitemap to robots.txt, you can set this field to No.

Sitemap robots config

Once you have configured each section of the XML sitemap, click Save Config and flush your caches.

You can now start to generate your Magento 2 XML sitemap

Conclusion

We hope you find this step-by-step guide to "configure XML sitemap in Magento 2" helpful. Feel free to share this article or leave a comment below. Your opinion is much appreciated!

Tags: xml sitemap splitter for magento 2 sitemap magento-2-marketing-tutorials