How to Create a Sitemap in PrestaShop 1.7 & Add it to Google Search Console

Apr 15, 2020

14452 Evgeny T.

How to Create a Sitemap in PrestaShop 1.7 & Add it to Google Search Console

Want to help search engines understand what your business is about and improve SEO? You won’t reach this goal without a clear sitemap. Find out here how to create a sitemap for your PrestaShop store without any complications and then connect it to Google Search Console.

How to Create a Sitemap in PrestaShop 1.7
How to Add the Sitemap to Google Search Console

How to Create a Sitemap in PrestaShop 1.7

Sitemap is a file which is needed to speed up indexing of your website by search engines. It is basically an XML file which lists all the products and pages of the online store. When search engines come across this file, they can easily and efficiently index all website pages. After that, the products on these pages can be displayed in search results when a user makes a search query.

To create a sitemap in PrestaShop 1.7, you need to install and configure a special Google Sitemap module. It is a tool that helps building a map of your store and updating it after that.

You can download the module for your PrestaShop 1.7 store from GitHub.

Keep in mind that after downloading, the folder name should match the name of the module: gsitemap.

So, let’s take a look at sitemap creation. You need to open the admin panel and proceed to Modules ➜ Modules and Services. Type the keyword gsitemap into the search bar:

PrestaShop 1.7 sitemap

The configuration page has a number of settings as you can see on the following screenshot:

how to generate sitemap in prestashop

Here we mark the categories that will not be included in the sitemap. We recommend not to include an authorization page, shopping cart, personal page, orders history and others where the same information is displayed for each visitor at the same address. Besides, you do not need to include service pages such as the 404 page in the sitemap.

After you’ve made sure to look through all the checkboxes, you should start generating the file clicking on the Generate Sitemap button.

After that, you will be given the sitemap address. For example, it can be http://presta/1_index_sitemap.xml.

Save this URL in your Google Search Console account and robots.txt. The module will show you the file size and the number of indexed pages. Do not forget to update the file on a regular basis, so that the search systems could make a full indexation of the site.

how to configure sitemap in prestashop 1.7

The last block of the configuration page contains the cron link. A good sitemap is a regularly updated sitemap. If you don’t feel ready to constantly press the Update the sitemap file button, perhaps you’d want your server to do it for you. Create a cron task using this URL, and don’t bother yourself with it anymore.

If you do not know what a cron task is, you can consult your hosting provider.

prestashop 1.7. sitemap

development_prestashop

PrestaShop Development

Take your online store to the next level with BelVG PrestaShop Development

Visit the page

How to Add the Sitemap to Google Search Console

You have generated the sitemap files following the above guide. So, what’s next? Now, you need to add the sitemap file to Google Search Console to inform the search engine about the website. In order to do it, you should follow the steps below.

Step 1. First of all, you should sign in Google Search Console.

add sitemap to google search console

We use the URL prefix. So, here you enter the site url and click on Continue.

prestashop sitemap configuration

Step 2. You should download the HTML file and add it to your website. With the help of the ftp-manager, you can use, for example, the file manager in your hoster-panel. You need to add this html-file into your site’s root directory.

Andrey_Dubina

Partner With Us

Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

sitemap configuration Google console

google search console verification

If you click on Verify, you get the following message.

prestashop 1.7. sitemap create

Step 3. Log in your Google Search Console account and select the Sitemaps tab.

google console account

Step 4. We have already generated sitemap files. So, go to the admin panel of your site and check it.

prestashop sitemap add to google console

google console - add sitemap

Step 5. Now let’s add sitemaps URLs in Google Search Console.

prestashop sitemap generation

how to add a sitemap to google search console

If you have performed everything well, you will get the following result:

google search console - how to add a sitemap

Wrapping it up

Now, Google is able to see your website much better. Well done! The sitemap is a must for any online business that wants to have improved SEO. If you have any questions, feel free to leave them in the comments below. We are here to help you.

Looking for a quality PrestaShop solution? Find a suitable one at the BelVG store. All our PrestaShop modules and themes are now free due to the COVID-19 outbreak!

Andrey Dubina

Partner With Us

Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

12 Comments

  1. Hi Ondrej
    Please check the module file /modules/gsitemap/gsitemap.php, method _createIndexSitemap(), 864 line

  2. Hi I have similar problem as Anna said. In which file do I find the line of code which should been edited? pls
    Thnx
    Regards
    Ondrej

  3. Hi, Anna! Thanks for your question.
    You need to rename the file name in the code so that it would not be rejected. The name should be changed in the following line of code file_put_contents($this->normalizeDirectory(_PS_ROOT_DIR_) . $this->context->shop->id . ‘_index_sitemap.xml’, $xml_feed->asXML());.
    What concerns your question about whether it will updated weekly – it will be only in case you have set up cron.

  4. hi, Google rejecting the file name, they want me to rename it, if I rename the file, does the app recognize the file and update it weekly?

    thank you

  5. Hi, Fred! Thanks for your question.
    As I see it, the archive extension can be as a file with .zip format, but if it doesn’t work, you may try a tarball format (.tar, .tar.gz or .tgz).

  6. Hello , when I got to the module page in my admin and try to upload th Zip file I get a message saying Upload Failed.
    Should I unpack the Zip file and upload it with FileZilla ?

  7. Hi, Robert!
    It’s rather difficult to answer your question not knowing the details. What module exactly did you install?

  8. I have a problem with the official module from Prestashop, it seems that it does not include in the sitemap the tags, although they are permitted by Google Robots. Have any ideea?

  9. Hi, John
    Thank you for your question.
    It seems that you have problem with permissions. Please, check the sitemap file in the root directory.

  10. I have downloaded and installed module, and 2 sitemaps has been generated. The problem is that i am getting 404 on clicking sitemap address. How to debug that issue ?

  11. Hi Florian,
    First, open the “Manage installed module” page (https ://prnt.sc/l66xs5) and upload this archive (https ://goo.gl/zGP9SS) there. The archive extension can be: .zip or a tarball format (.tar, .tar.gz or .tgz). Most importantly, the name of the module and the archive should be “gsitemap” (http ://prntscr.com/l66z4u). If this doesn’t work, you will need to check the access rights to the folders.

  12. Hi I’ve downloaded the module and renamed it but still can’t find it in the “module” panel. is there any other step?

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *