How to Generate Google Sitemap for Magento? (In 5 Easy Steps)

generate google sitemap for magento

Generate Google Sitemap for Magento to boost your search engine ranking. It is mainly designed to crawl pages that may not be otherwise found by web crawlers.

A sitemap can be put together to index all pages and images. When we enable google sitemap, Magneto creates a file known as sitemap.xml. 

The sitemap for Magento helps you in setting up the frequency of updates and the order in which the content should be generated. 

It is crucial to update content and sitemap simultaneously. If the content of your e-commerce store changes in a day, week or month, update the Magento sitemap with the same frequency. 

If your site is still under-development, then you must consider adding instructions in the robots.txt file so that web crawlers don’t index your site.

And when your site is set in motion, you can alter the instructions to permit the Magento store pages to be indexed. 

Here is step by step guide on how to generate Google Sitemap for the Magento store:

  1. Configure the Sitemap
  2. Generate the Sitemap
  3. Configure and Enable Robots.txt
  4. Submit your Sitemap to Search Engines
  5. Restore Previous Robot Instructions

Step 1- Configure the Sitemap

This step involves setting up what is to be included in the sitemap and how frequently it needs to be updated.

1. Go to the Admin sidebar and select Stores. After that, under Settings go to Configuration.

configure google sitemap

2. You will see the Catalog option on the left side of the panel. Expand. Choose XML SItemap.

xml sitemap option

3. On the right side, you will see Categories Options on the top.

  • Set your Frequency
  • Set your priority from 0.0 to 1.0 (Zero to Highest)
categories options

4. Now expand the Products Options tab.

  • Set your Frequency.
  • Set your Priority from 0.0 to 1.0 (Zero to Highest).
  • To control the number of images that are included in the Magento sitemap, set Add Images into Sitemap.
product options

5. Click on CMS Pages Options to expand.

  • Set your Frequency.
  • Set your Priority from 0.0 to 1.0 (Zero to Highest).
cms pages options

6. After completion, press the Save Configuration button.

7. When you are done with Categories Options, expand the Generation Settings section.

  • To create a sitemap XML in Magento, Set Enabled to Yes.
  • Set up Start Time at which you want the sitemap to be updated.
  • Set your Frequency.
  • In the Error Email Recipient field, you have to give the email address at which you want to receive notification in case of error occurrence.
  • Set your Error Email Sender.
  • Set your Error Email Template
generation settings

8. After this, you have to Set the Map File Limits.

  • Enter the maximum number of URLs that you want to include in your Magento sitemap in the Maximum No of URLs per File field. (Max. 50,000).
  • Enter the largest size in bytes that are allocated for Magento sitemap in the Maximum File Size. (Default size- 10,485,460 bytes).
sitemap life limits

9. The final step is to Set the Search Engine Submission Settings.

  • Expand Search Engine Submission Settings/
  • If you are using a robots.txt file, then set Enable Submission to Robots.txt to “Yes.”
  • After completion, press Save Configuration button.
search engine submission settings

Step 2- The next step is to generate the Sitemap

1. To do this, go to the Admin menu and choose Marketing.

generate-sitemap

2. In Marketing, you will see a heading- SEO & Search.  Under this, click on the SItemap.

3. Choose Add Sitemap. Then enter the Filename in the given field. For example sitemap.xml

4. After this, enter the Path to decide where the XML file is to be present on the Server. Keep in mind that the path must be writable.

  • /sitemap/- This depicts that Magento sitemap file in a directory known as “sitemap.”
  • /- This places the sitemap for Magneto at the root of your Magento installation.
define sitemap path

5. Once you are done, click on the Save and Generate button.

Step 3- Configure and Enable robots.txt

The default Magento configuration involves instructions for web crawlers and bots to index your site. These instructions are saved in the form of a file under the name of “robots.txt.” It is present in the root of your Magento Installation.

The default setting does not allow web crawlers to index those part of the website that contains files to be used internally by the system. You can either choose the default setting or customize your own. 

Steps involved are:-

1. Go to the Admin and click on Content.

2. Under the Design section, select Configuration.

Configure and Enable robots.txt

3. In the first row of the grid- find Global configuration. Click Edit.

4. After that, expand the Search Engine Robots section.

search engine submission settings

5. Customize Default Robots to one of the following:

INDEX, FOLLOWIt allows web crawlers to index both the website and regular updates.
NOINDEX, FOLLOWIt inhibits web crawlers to index the website but to check back for regular updates. 
INDEX, NOFOLLOWIt allows web crawlers to index the website but not the regular updates. 
NOINDEX, NOFOLLOWIt inhibits web crawlers to index both the website and regular updates. 

6. You can also add custom instructions to Edit Custom instruction of robots.txt file.

7. To restore default instructions, click on Reset to Default.

8. After completion, click on the Save Configuration button. 

Step 4- Submit your Sitemap to Search Engines

You can submit your sitemap for Magneto to various search engines by providing them Magento sitemap URL. To copy the link, follow the steps given below:-

  1. In the sitemap grid, right-click the URL in the Link for Google column.
  2. Select Copy Link Address on the menu. 

Step 5- Restore Previous Robot Instructions 

You can restore either default or original instructions according to your requirements. 

Wrap Up

That’s it.

You have successfully created and submitted the sitemap for Magento.

If there is any issue, please leave it in the comment box.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new modules, and more. 100% Magento Goodness, a promise!

1 thought on “How to Generate Google Sitemap for Magento? (In 5 Easy Steps)”

  1. hello, when I Go to Marketing in Magento 2 > SEO & Search, there is no button “Site Map”, only URL rewrites & Search Terms, please advise further?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

We can help you. Right now.

Fast growing merchants depend ServerGuy for high-performance hosting. Experience counts. Let's get started.

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

Core Web Vitals Book COver

Is your website ready for Core Web Vitals?

Take this FREE book with you and optimize your store for speed.

Learn all about new Google new ranking factors and get that top ranking.