Magento Tutorials

How to Generate Google Sitemap for Your Magento Store

magento-sitemap

Google Sitemap is an .xml file which serves as a guideline for Google bots (and other search engines’ crawlers as well) on all of the pages on your website so it would be easier than findind and indexing the pages on their own.

Normally you have to do this manually if your website is small enough but in the case of an e-commerce site built on Magento, there usually are many products, which means many URLs and that makes creating a sitemap manually impossible. Fortunately, Magento has a built-in functionality of generating a sitemap. If you do not know it yet, this guide is gonna help you create and submit a sitemap for your Magento store.

Step 1: Generate the sitemap

In Magento 1:

  1. In your backend, go to System > Configuration. On the left menu, under Catalog section, click Google Sitemap.
    magento sitemap
  2. Under Generation Settings, set Enabled to Yes. Then click Save Config.
    magento sitemap config
  3. Click the Add Sitemap button.
    magento add sitemap

     

    • Filename: Enter “sitemap.xml”
    • Path:
      • To put the sitemap in a folder, enter the path to the folder: /sitemaps
      • To put the sitemap at the base path of your store, enter a forward slash: /
    • Storeview: The view where the sitemap will be used
  4. Click the Save & Generate button to create the sitemap.

In Magento 2:

  1. In your backend, go to Stores > Settings > Configuration. On the left menu, under Catalog section, click XML Sitemap.
    magento 2 sitemap config
  2. Under Generation Settings, uncheck Use system value box on Enabled and set it to Yes. Then click Save Config.
  3. Go to Marketing > SEO & Search > Site Map. Click the Add Sitemap button.
    magento 2 add sitemap

     

    • Filename: Enter “sitemap.xml”
    • Path:
      • To put the sitemap in a folder, enter the path to the folder: /sitemaps
      • To put the sitemap at the base path of your store, enter a forward slash: /
    • Storeview (if you have multiple storeviews): The view where the sitemap will be used
  4. Click the Save & Generate button to create the sitemap.

After being generated, the sitemap appears in the list, with a link to sitemap.xml file. From here, you can do the following:

    • To view the sitemap, click the hyperlink in the Link for Google column. This is the link that you will later submit to Google.
  • To update the sitemap, click the Generate link.

Step 2: Submit your sitemap to Google

  1. Log in to your Google Search Console account (or create a new one if you don’t have an account yet).
  2. Click the Add A Property button. Enter your website homepage into the popup and then click Add. For example: https://www.example.com/
    google search console property
  3. You will then be asked to verify that you are the owner of this site. You can use your Google Analytics account or one of the alternate methods that Google offer.
  4. After verification succeeds, you can access your site property from Search Console Dashboard. Go to Crawl > Sitemaps. Click the Add/Test Sitemap button.
    google search console add sitemap
  5. Return to your store Admin, and copy the path to your Google sitemap. If necessary, log back in and do the following:
    a. Go to Catalog > Google Sitemap.
    b. In the Link for Google column, right-click the link to your sitemap. Then on the context menu, click Copy Shortcut.
    c. Open a text editor and paste the link. Then, copy the part of the link that comes after the “dot com.” It looks like this:
    /media/s4d71280645299/sitemaps/sitemap.xml
  6. Return to Google Search Console and paste the text into the box to complete the address of your sitemap. Then, click the Submit button.
  7. Google Seach Console will then show the number of Submitted URLs in your sitemap, along with 0 Indexed URLs. Don’t worry, this is totally common. It takes Google a few days to index your submitted URLs, and the number of Indexed URLs will show up after some time.
    google search console sitemap

It’s done! You have successfully created a sitemap for your Magento website. Please remember this does NOT guarantee that all of your URLs will be indexed by Google, but rather makes the index process faster and easier.

 

Recommended posts:
How your Magento store can benefit from Google AMP

SEE MORE:

4 Comments

Dom

A knowledge craver who always strive to be wiser everyday.

    avatar
    3 Comment threads
    1 Thread replies
    0 Followers
     
    Most reacted comment
    Hottest comment thread
    4 Comment authors
    Henry RogerDomAshokDamon Moats Recent comment authors
      Subscribe  
    newest oldest most voted
    Notify of
    Damon Moats
    Guest
    Damon Moats

    Great, Its a very good video tutorial, and I would like to add that there’s another detailed step by step tutorial for creating Magento 2 sitemap on magenticians. I found it much easier to follow, for better understanding do have a look at it too. Thanks

    Ashok
    Guest

    Very Nice and Good explanation

    Henry Roger
    Guest
    Henry Roger

    Hi Dom,
    While I was scrutinizing on sitemap in magento I found your article helpful. Also, I read other articles and consulted forums where someone suggested me magento sitemap extension fmeextensions. but that was paid. can you please help me find any unpaid solution for that?

    Note: I can’t code as well.