Configuring Sitemap XML in Magento 2: A Detailed Guide

Configuring Sitemap XML in Magento 2: A Detailed Guide

Generating Magento 2 sitemap enables the Magento store to create a list of all the pages and files on the web site’s URL on a single page.

When all the links appear on a single page, Google crawlers can quickly read and index them. Sitemaps are a fantastic tool to organizes the pages that need to be crawled by any search engine. It improves the SEO of the store.

According to Google:

Search engines like Google read sitemap to more intelligently crawl your site. A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files: for example, for pages, when the page was last updated, how often the page is changed, and any alternate language versions of a page.

In this post, you will learn how to configure Magento 2 sitemap.

Before, you have to generate the Magento Google Sitemap.

How to Configure the Magento 2 Sitemap?

  1. Set The Frequency And The Priority Of The Updates
  2. Configure The Frequency And Priority Of Content Updates
  3. Generate The Sitemap
  4. Set Sitemap File Limits
  5. Complete The Search Engine Submission Settings

Step 1: Setting the frequency and the priority of the updates

  • Go to Admin Panel, click on Stores.
  • Select Configuration in the Setting section
  • Find the XML Sitemap under Catalog from the left panel.
  • Open the Categories Options, and set the Updated Frequency.

Step 2: Configure the Frequency and Priority of Content Updates

  • On the Admin panel, click Stores. In the Settings section, select Configuration.
  • Select XML Sitemap under Catalog in the panel on the left
  • Open the Categories Options section, and continue with following:
Configuring Sitemap XML in Magento 2: A Detailed Guide image1

You will find options to assign in the Frequency field. You can set it up:

  • Always
  • Hourly
  • Daily
  • Weekly
  • Monthly
  • Yearly
  • Never

Next is a priority field.

The value of priority ranges from 0.0 to 1.0. You can set the Zero if the priority is low and 1 for the high priority.

Next are product options.

Configuring Sitemap XML in Magento 2: A Detailed Guide image2

Same as Categories, set the Frequency and Priority of the Sitemap.

In the Product section, you will find a new option.

  • Add Images into Sitemap

You will get three options, select one of the following to determine the extent that images are included in the sitemap.

  • None
  • Base Only
  • All

On the next page, you will find the CMS Page Options section.

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

Click on Save Config after completing it.

Step 3: Generating the Sitemap

  • Open the Generation Setting section
Configuring Sitemap XML in Magento 2: A Detailed Guide image3
  • Enables it by selecting Yes from the options

There are many functions below, that you have to customize.

  • In the Start Time field, set the hour, minute, and second to begin the update of the sitemap.
  • In the Frequency field, choose one of the following.
    • Daily
    • Weekly
    • Monthly
  • Enter the email address into the Error Email Recipient field, to receive the notification in case of any errors during a sitemap update.
  • In Error Email Sender, you have to choose one from the option:

    • General Contact
    • Sales representative
    • Customer support
    • Custom email

    In the Error Email Sender field, choose the template used for the error notification.

Step 4: Magento Sitemap File Limits

The next section to configure Magento Sitemap is File Limits.

  • Open the Sitemap File Limits section.
Configuring Sitemap XML in Magento 2: A Detailed Guide image4

Maximum No of URLs Per File: The number of the maximum number of URLs that could be made into one file. The default limit is 50,000. However, if your store has more pages, you can increase it.

Maximum File Size: The size of the file in bytes. Default size is 10,485,760. But you can customize it, as per your Magento 2 Hosting limitations.

Step 5: Complete the Search Engine Submission Settings

Configuring Sitemap XML in Magento 2: A Detailed Guide image5
  • Go to the Search Engine Submission Settings section
  • Enable the Robot.txt field, select Yes. It will give the instructions to the Google Crawlers about what page to index and what page is not allowed to index.
  • When complete, click Save Config.

Also Read

  • How To Change Magento 2 Base URL?
  • What Are MySQL Triggers And How To Create Them?
  • Magento 2 Commands: A Useful List For Magento Developers
  • How To Install Magento 2.4 With Command Line?

Wrap Up

In this post, you learned how to configure Magento 2 sitemap.

If there are any questions or issues you encounter, feel free to leave a comment.

Read the latest blog posts

GTmetrix Explained: A Comprehensive Guide to Speed Testing Your Site

GTmetrix Explained: A Comprehensive Guide to Speed Testing Your Site

Do you want to take the GTmetrix speed test to check the performance of your website?

The Importance of a Dedicated IP Address and Why You Need One

The Importance of a Dedicated IP Address and Why You Need One

Curious if you need a dedicated IP address or not?

Spread the news! Share this Article!

© Copyright 2019 - 2024 YouDBox.site. All Rights Reserved.