Are you looking to configure Magento 2 sitemap?
Creating a sitemap is one of many ways to optimize the store for search engines. Users, crawlers, and bots can view the website structure better using the sitemap.
This article will provide more information about the sitemap and how to configure Magento 2 sitemap.
What is Magento 2 Sitemap?
A Magento 2 sitemap is a file where the information regarding your store structure is stored. It is like one URL where all the URL and their relationship are located.
Google and other search engines crawl the websites to find the web pages. Search engines use robots to crawl. The sitemap tells the crawlers all the pages and links that are important and should be indexed.
In terms of Magento SEO, the sitemap displays the website in front of crawlers so they can quickly go through every link.
You can easily configure Magento 2 sitemap without installing a Magento extension.
How to configure Magento 2 sitemap?
Follow the steps to configure Magento 2 sitemap:
Navigate to Stores > Configuration > Catalog > XML Sitemap.
You will find several options to configure the XML sitemap for.
Let’s see each option.
#1 Categories Options
Category options are for the product categories on the Magento 2 store.
Frequency: Frequency of updating the sitemap. If you are regularly making new categories, you should do it daily. If you don’t make a new category, you can leave it on weekly.
Priority: Add the priority to index the category of the store. Leave it at default.
#2 Product Options
Add the frequency for the products and priority to be indexed.
Select if you want to add the image to the sitemap. The ideal practice is to add the images to sitemap and redirect the individual URLs to the page.
#3 CMS Pages
Enter Frequency and Priority for indexing your Magento 2 store CMS Pages.
#4 Store URL Setting
Similarly, enter the frequency and priority for the other Store URLs.
#5 Generation Setting
- Enable the Sitemap generation by selecting the Yes from the dropdown
- Set the Frequency and Start Time to update the XML sitemap
- Error Email Recipient: To receive the the notification in case there is some error in the sitemap update
- Error Email Sender: Email address of the sender when sending error message
- Error Email Template: Email template to be used in sending error message
#6 Sitemap File Limits
Maximum No of URLs per File: How many URLs you would like to include in one sitemap file
Maximum File Size: To set the maximum size of the Magento 2 sitemap file
#7 Search Engine Submission Settings
Enable the search engine submission setting to add the sitemap to the robots.txt file. The robots.txt file guides the crawlers to index the website.
That’s it. The sitemap is generated. Now you can add the sitemap to the Magento 2 store.
How to add sitemap to Magento 2?
Follow the steps to add the new XML sitemap in Magento 2:
- Navigate to Marketing > Seo & Search > Site Map
The next page will load the sitemap setting of the Magento store.
- Select an existing sitemap to edit or Add Sitemap if you don’t have any XML sitemap yet.
Filename: The filename of the sitemap. It will be sitemap.xml.
Path: Path of the sitemap. The sitemap is typically generated on the domain path. Add a slash mark here. /
Click on the Save to save the configuration. Your sitemap is added to the Magento 2 store.
Do I need a sitemap?
It is not essential to have a website sitemap, as the crawlers can arrive at the website through multiple paths. However, a sitemap arranges the important pages and URLs so the crawling and indexing can be done quickly and finely.
I hope this article helped answer all your questions about XML sitemaps and how to create an XML sitemap for the Magento 2 store.
If you encounter an issue at any step, feel free to leave it in the comment section.