Stratus Magento 2 Guides - Configuring a Sitemap
A Sitemap is a plain text XML file that contains links to all of the pages on your website. It is used by the search engines to properly crawl and index your website.
To generate a sitemap in Magento 2:
- Go to Marketing > Site Map in the backend of your Magento 2 store.
- If you don’t already have a sitemap showing in the list, click Add Sitemap.
- Enter the filename you wish to use (e.g. “sitemap.xml”).
- Enter the file path from the root of the Magento install you wish to have Magento generate the sitemap. Most will simply enter in “/” for the root directory.
- Click Save & Generate to have Magento create your initial sitemap.
To configure the parameters of the sitemap:
- Go to Stores > Configuration > Catalog > XML Sitemap in the backend of your Magento 2 store.
- Review the settings for each subpanel.
- Select “Yes” for Generation Settings > Enabled to have Magento regularly create an updated sitemap. Once you do, you’ll see additional settings to configure for start time, frequency, and whether to email an error report to someone.
- The final panel you will most likely wish to attend to is the Search Engine Submission Settings subpanel. By selecting “Yes” for Enable Submission to Robots.txt Magento will insert a link to the sitemap to the site’s robots.txt file which instructs search engines what they should and should not index in your site. By linking the sitemap file, you are giving the search engine quick notice of all the pages in your Magento store.
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.
Last modified January 1, 0001