How to create Magento 2 XML Sitemap and why does it matter to your web store?

Why XML Sitemap matters in Magento 2?

While using the Sitemaps you can show Google the importance of new pages and make the search engine better understand the site structure. The faster the indexing of new pages, the shorter the queue time of your new products in Google will be. Moreover, if you want your XML Sitemaps to be more flexible for setting, you can implement the XML Sitemap extension for Magento 2 to config xml files and make the grade.  

How to create Magento 2 Sitemap?

To create and configure Sitemap in Magento 2 keep up to with the next steps:

  • Config XML file in Magento process starts with getting logged into your Admin Panel:

magento-admin-panel

  • Choose ‘STORES’ on the left sidebar:

magento-admin-stores

  • Select ‘Configuration’ here:

magento-admin-stores-config

  • Then click XML Sitemap to see all the options:

magento-admin-xmlsitemap

  • Pick ‘Category Options’ and set ‘Frequency’ to one of the options there. 

  • The ‘Priority’ should be valued (0.0 to 1.0):

magento-admin-categories-options

Magento 2 Sitemap page priority:

Weighting page type is supported by Magento 2. Any page type can be assigned priority: categories, products, CMS pages, etc. In this the Magento 2 sitemap generation is similar with Magento 1: go to > Stores/ Settings/ Configuration/ Catalog/ XML Sitemap.   

Take the same steps with the ‘Products Options’/ ‘CMS Pages Option’> ‘Frequency’> ‘Priority';

  • To attach images to the Sitemap choose ‘Add Images to Sitemap’ > ‘All’ from the drop-down menu:

magento-admin-product-options

  • In the ‘Generation Settings’ set ‘Enables’ to ‘Yes’:

magento-admin-general-settings

Also, set the ‘Start Time’ for future update and set ‘Frequency’ to ‘Daily’ if you want it to be renewed in this regime. 

Automatic generation of Sitemap:

Using cron job the Sitemap can be generated daily/weekly/monthly at any time you like it.

To make it you need to go to 'System'>'Configuration'>'Advanced'>'System'>'Cron (Scheduled tasks)':

magento-admin-cron-job

!Mind the automatic generation is created in case the Sitemap has been already set by hand. 

Return to the previous settings, put in an ‘Error Email Sender/Recipient’ and choose an appropriate style for it from the drop-down menu.  

  • Click the ‘File Limits Section’. Enter your limit of XML Sitemap URLs in the ‘Maximum No of URLs per File’. Don’t forget to mention the ultimate file size in the ‘Maximum File Size’ box:

magento-admin-system-file-limits

  • Press the ‘Save Config’ button.

!When using robots.txt file set ‘Enable Submission to Robots.txt’ to ‘Yes’.

Besides, we offer you our new module, which allows for much easier and more effective work with the Sitemaps.

Magento 2 Sitemap URL

How can I find my Magento Sitemap URL?

  • Navigate to Marketing>Seo & Search>Site Map:

sitemap-url-path-magento

  • The sitemap URL is under Link for Google.

There are no category and product URLs like it was in Magento 1.x.x. 

How can I add my Sitemap location to robots.txt?

via the Admin Panel

Once you have found your sitemap URL, add it to your robot.txt.

  • Go to Stores>General>Design>Search Engine Robots:

sitemaprobots-magento

  • Save the settings and clear the cache.

Manually

You can add the sitemap manually.

  • Find the default settings for Magento 2 for robots.txt. Make all the required changes and add your sitemap URL to the end:

robots-sitemap-manual-magento

Mind all the manual changes will be overwritten once you save robots settings in the Admin Panel.

How can we help you?

Didn’t you find the answer to your question? We are always happy to help you out.

© 2009-2024 Amasty. All Rights Reserved.