1. Overview
Google and other engines use programs which are often known as crawlers to “read” (index) your pages and decide which ranking the content deserves on the search result. Submitting an XML sitemap to these crawlers is how you can get your Magento store indexed. XML Sitemap for Magento 2 is an effective tool for creating and optimizing the best XML sitemap for SEO.
2. How Does It Work?
To configure XML sitemap for your Magento 2 store, please follow these 2 steps:
- Step 1: Configure the extension settings as your wishes at Stores ⇒ Configuration ⇒ BSSCOMMERCE ⇒ Google XML Sitemap.
- Step 2: Create a new XML sitemap at Marketing Google XML.
First, we will show you how to configure the extension settings.
2.1. General Setting
In Enables: Choose Yes to enable frequency setting for the extension to update the sitemap, otherwise choose No to disable it.
In Frequency: Choose the frequency for the extension to update the sitemap. The options are Daily - Weekly – Monthly.
In Error Email Recipient: Choose the recipient to receive error email once there is an error.
In Error Email Sender: Choose the name of the sender displaying in error email.
In Error Email Template: Choose the template for error email.
In Root Path: enter a root path for the xml sitemap.
In Sitemap Title: enter a title for the sitemap.
In Description: enter a description for the sitemap.
2.2. Homepage Options
In Show Homepage: Choose Yes to show homepage in the XML sitemap, otherwise choose No to hide it.
In Frequency: Choose the frequency for the search engine crawlers to index Homepage. The options are: Always - Hourly - Daily - Weekly - Monthly - Yearly - Never.
In Priority: Choose the priority for the search engine crawlers to index Homepage. Valid values range from 0.0 to 1.0.
In Enable Modify: Choose Yes to show the time of the latest modify of the homepage in XML sitemap file, otherwise choose No to hide it.
2.3. Categories Options
In Frequency: Choose the frequency for the search engine crawlers to index category pages. The options are: Always - Hourly - Daily - Weekly - Monthly - Yearly - Never.
In Priority: Choose the priority for the search engine crawlers to index category pages. Valid values range from 0.0 to 1.0.
In Disable Categories: Fill in the ID of categories you want to hide from sitemap (separated by a comma). Products in selected categories will not be affected by this setting.
2.4. Product Options
In Enable Path: This setting depends on the Use Categories Path for Product URLs of your site. Please go to Stores ⇒ Configuration ⇒ Catalog ⇒ Catalog ⇒ Search Engine Optimization ⇒ Use Categories Path for Product URLs:
- If the setting is No, you will choose No at Enable Path.
- If the setting is Yes, you will choose Yes at Enable Path.
In Frequency: Choose the frequency for the search engine crawlers to index product pages. The options are: Always - Hourly - Daily - Weekly - Monthly - Yearly - Never.
In Priority: Choose the priority for the search engine crawlers to index product pages. Valid values range from 0.0 to 1.0.
In Add Images to Sitemap: Choose how you want to add the images of products into your XML sitemap. There are 3 options:
- No: Do not add images to the sitemap.
- Base Only: Only add base images of products into the sitemap.
- All: Add all images of products into the sitemap.
In Disable Product Type: You can choose to hide all products belong to (a) product type(s) from the sitemap.
In Disable Product: Fill in the ID of products you want to hide from sitemap (separated by a comma).
2.5. CMS Page Options
In Frequency: Choose the frequency for the search engine crawlers to index CMS pages. The options are: Always - Hourly - Daily - Weekly - Monthly - Yearly - Never.
In Priority: Choose the priority for the search engine crawlers to index product pages. Valid values range from 0.0 to 1.0.
2.6. Additional Link List
In Frequency: Choose the frequency for the search engine crawlers to index additional links. The options are: Always - Hourly - Daily - Weekly - Monthly - Yearly - Never.
In Priority: Choose the priority for the search engine crawlers to index additional links. Valid values range from 0.0 to 1.0.
In List of Additional Links: Fill in the list of additional links to be shown in the sitemap.
2.7. Sitemap File Limit
In Divide Sitemap: There are 4 options for dividing sitemap
None: Do not divide sitemap.
Date: Divide site map by the last modified date of the products.
Category: Divide site map by the products in the same category.
Manufacture: Divide site map by the products with the same manufature.
Note: Sitemap is divided following the maximum number of URLs per file and maximum file size settings.
In Maximum No of URLs per file: Maximum number of URLs in an XML sitemap file.
In Maximum File Size: Maximum file size in byte.
2.8. Search Engine Submission
In Enable Submission to Robots.txt: Choose Yes to display sitemap file location in Robots.txt file, otherwise choose No.
2.9. Generate Sitemap
After finishing setting up the extension, admins will generate a sitemap which will be created following the above settings.
Please go to Marketing ⇒ Google XML, select Add Sitemap to create a new sitemap.
In File Name: Choose the name for the sitemap. The format is nameofthesitemap.xml.
In case you are already using an XML sitemap, there would be 2 options at this point:
- Create a new sitemap with a different name from the old sitemap. You can submit both sitemaps on Google Search Console and the crawler will read both file.
- Delete the old sitemap then create a new one with the same name as the old. The new sitemap following the module setting will be over written on the search console and will not affect SEO.
In Path: The default path is “/”. If you want to use a different path, you have to create a new folder at the backend.
Choose Save.
After saving the sitemap, click Generate for the sitemap to be created following the module settings.
2.1o. Include/exclude pages from the XML Sitemap
In product/category edit page, you can easily include or exclude these pages from the XMl sitemap.
Please go to Search Engine Optimization section to configure Yes or No for the
Once you set No for the