How to Generate a Sitemap in Magento 2

Updated on Mar 13, 2019

A Sitemap is a plain text XML file that contains link to all of the pages on your website. It is used by the Search Engines to properly crawl and index your website. In Magento 1.x this option was called Google Sitemaps and was located in the Catalog menu. However, things have changed in Magento 2.

To access your Sitemap's configuration page, you will need to access your website's admin area and navigate to Stores → Configuration.

From there access the Catalog → XML Sitemap section.

Accessing the XML Sitemap Configuration page

Here you will have to expand all of the individual parts of the configuration page:

XML Sitemap Categories and Products Options

For Categories, Products and CMS options you will have frequency and priority of creation of new entries as well as an option to add the images of products into the sitemap.

XML Sitemap CMS Pages Options

In the Generation Settings you will be able to Enable Sitemap Generation and set a time of the day for it (if you choose a daily frequency for example).

XML Sitemap Generation Settings

In the Sitemap File Limits section, you can choose the limit of URLs per file and the maximum size of a file (in bytes). Last but not least, you will have to decide, if you want to If you add a reference of your sitemap to your robots.txt file. This will make search engines find it automatically.

Limiting and sumbitting Sitemaps

Once you have configured the XML Sitemap schedule and options, click the Save Config button at the top right corner of the page.

Congratulations, you have improved the SEO of your Magento 2 based Store.

On this page...

    Magento 2 Hosting

    • Free Installation
    • 24/7 Magento Support
    • Free Domain Transfer
    • Hack-free Protection
    • Fast SSD Storage
    • Free Cloudflare CDN
    • Free Magento Transfer
    • Immediate Activation
    View More