Username
Password
Remember Me
Log in

How to generate a sitemap in Magento 2

Magento 2 Discussion
Written by ITORIS Team, 2018-06-13   

How to generate a sitemap in Magento 2

A sitemap is an XML file that lists all the URLs your site has. This file also allows webmasters to include some useful information about the page, including the date it was last modified, its change frequency and so on. This handy tool is used by the search engines for crawling and indexing purposes.


How to generate a sitemap in Magento 2

In order to generate a sitemap in Magento 2 you’ll need to go through the following process:

Step 1: Login to your Admin account and proceed to Stores SettingsConfiguration CatalogXML Sitemap. Edit the necessary settings for the Categories Options, Product Options and CMS Pages Options:

XML Sitemap Settings in Magento 2

Step 2: Open the Generation Settings, change their status to Enable, choose a Start Time you would like search engines to crawl your pages from, select the crawling frequency, enter the Error Email Recipient and Error Email Sender. The Error Email Template field may be left with its default value:

Generation Settings in Magento 2

Step 3: Specify the Maximum Number of URLs Per File and Maximum File Size limits in the section called Sitemap File Limits:

Sitemap File Limits Settings in Magento 2

Step 4: After configuring the Sitemap File Limits settings, proceed further by expanding the Search Engine Submission Settings menu and set the corresponding value of Enable Submission to Robots.txt field to Yes. Click Save Config button to save all the changes we’ve made so far:

Search Engine Submission Settings in Magento 2

How to generate a sitemap in Magento 2 manually

If you don’t have a cron job set-up for your site and would like to generate a sitemap for it, consider creating a sitemap in Magento 2 manually.

Go through these steps for a manual set-up process:

Step 1: Open the Sitemap setting page by navigating to Marketing SEO & SearchSite Map and click the Add Sitemap button:

Adding site map manually in Magento 2

Step 2: Enter the necessary values for your Filename, specify the Path and choose the most appropriate Store view. Click Save if you would like to only add a new sitemap without generating it. Alternatively, hit the Save & Generate button in case you’ll need a latter operation as well:

Sitemap settings in Magento 2

Step 3: Once you’ve chosen your preferred option, copy the generated Link for Google and submit it to the appropriate section of your Google Webmaster Tools account:


Link for Google in Magento 2

0 Comments