Generating Magento 2 sitemap enables the Magento store to create a list of all the pages and files on the website’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?
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:
You will find options to assign in the Frequency field. You can set it up:
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.
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.
- Base Only
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
- 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.
- 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.
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
- 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.
In this post you learned how to configure Magento 2 sitemap.
If there are any question or issues you encounter, feel free to leave a comment.