Configure Magento 2 Sitemap XML

Configure Magento 2 Sitemap XML

Generating Magento 2 sitemap creates a plain-text file that lists all the URLs of your Magento 2 website. It allows Google crawlers to read and index important pages, boost SEO, and create a website structure.

We look at how to configure XML Sitemap for Magento 2 stores.

Best Magento Hosting now

How to Configure Magento 2 Sitemap XML

1. Set the Frequency of updates

Configure Magento 2 Sitemap XML

  • From the Admin Panel, click on Stores.

  • Select Configuration in the Setting section

  • Find the XML Sitemap under Catalog.

  • Open the Categories Options, and set the Updated Frequency.

2. Frequency and Priority of Content Updates

  • On the Admin panel, navigate to Stores > Settings > Configuration.

  • Click on XML Sitemap under Catalog.

  • Open the Categories Options section and assign the options in the Frequency field.

Configure Magento 2 Sitemap XML

  • You can choose from Always, Hourly, Daily, upto Yearly or Never.

  • In the Priority field, the priority value ranges from 0.0 to 1.0. Set the 0 if the priority is low and 1 for high priority.

Now we set the Product Options.

Configure Magento 2 Sitemap XML

  • As we did for Categories, set the Frequency and Priority of the Sitemap.

  • In the Product section, you will find the following option:

  • Add Images into Sitemap

You get three options to set the extent that images are included in the sitemap.

  1. None
  2. Base Only
  3. All
  • Next, we go to the CMS Page Options section.

Configure the Frequency and Priority settings as we did in the Categories and Product Section.

  • Click on Save Config after completing it.

3. Generating the Sitemap

  • Navigate to the Generation Setting section

Configure Magento 2 Sitemap XML

  • Enable the sitemap as you select Yes from the options
  • Customize the following functions below-
  1. In the Start Time field, set the hour, minute, and second to begin the sitemap updates.

  2. In the Frequency field, choose one of the following.

  • Daily
  • Weekly
  • Monthly
  1. Add the email address to the Error Email Recipient field. It specifies the email to receive the notification in case of any errors on the sitemap update.

  2. In Error Email Sender, choose one from the following options:

  • General Contact
  • Sales representative
  • Customer support
  • Custom email
  1. Select the template used for the error notification in the Error Email Sender field.

4. Magento Sitemap File Limits

  • Configure Magento Sitemap in File Limits.

  • Go to the Sitemap File Limits section.

Configure Magento 2 Sitemap XML

  • Maximum No of URLs Per File: The maximum number of URLs made into one file. The default limit is 50,000, but you can increase it based on your requirements.

  • Maximum File Size: Add the size of the file in bytes. Default size is 10,485,760. You can customize it based on your Magento hosting limits.

5. Search Engine Submission Settings

  • Navigate to the Search Engine Submission Settings section

Configure Magento 2 Sitemap XML

  • Enable the Robot.txt field and select Yes. You will get the instructions for the Google Crawlers. It shows which pages to index and which ones are not allowed to index.
  • Click Save Config to implement the changes.

Summary

Configuring the XML Sitemap for your Magento 2 website helps Google correctly identify and crawl your pages. It allows you to target specific pages for high search engine ranking. The sitemap also improves user experience so visitors can navigate your site quickly.

We have covered how to configure XML sitemap for Magento 2. For more insights on the Magento platform, check out MGT Commerce tutorials.

Nikita S.
Nikita S.
Lead Technical Writer

As a lead technical writer, Nikita S. is experienced in crafting well-researched articles that simplify complex information and promote technical communication. She has expertise in cloud computing and holds a specialization in SEO and digital marketing.


Get the fastest Magento Hosting! Get Started