Sitemap and robots.txt in PrestaShop: how they are generated, what to check and the mistakes that cost traffic

Sitemap and robots.txt in PrestaShop

The sitemap and robots.txt are two small files that almost nobody looks at after setting up the shop. The first tells Google which pages you have. The second tells it where not to go. When they are right, you do not notice them. When they are wrong, they can leave the whole shop out of Google or fill the index with pages that do not sell, and nobody finds out until visits drop.

Below you will find what each one is for according to Google, how PrestaShop generates them, what to check and the most costly mistakes we see.

What each one is for

The sitemap is a list of the shop’s URLs. Google explains that it is most useful for large sites, new sites with few external links and sites with lots of images or video, and warns that it helps discover URLs but does not guarantee they will be crawled or indexed. A shop with hundreds or thousands of products falls squarely into the first group.

robots.txt tells crawlers which URLs they can access. Google is clear: it is mainly for avoiding overloading the server and it is not a mechanism for keeping a page out of Google. That is what noindex is for. A URL blocked in robots.txt can still appear in Google if other websites link to it, usually without a description.

What the sitemap and robots.txt are for in PrestaShop
According to Google.

How PrestaShop generates them

robots.txt. PrestaShop generates it from the back office, in Shop Parameters > Traffic & SEO, at the bottom of the page. It creates it with blocks for pages that should not be crawled: cart, order, customer account, internal search and some parameters. If you later install modules or change languages, you should regenerate and review it, because the file does not update itself.

Sitemap. PrestaShop does not generate it out of the box: it is done with a module. The most common is the official “Google sitemap”, which creates one sitemap per language with products, categories, content pages and brands. It has to be configured to regenerate automatically, with a scheduled task, or the sitemap stays with the products from the day it was created.

What to check in robots.txt

  1. Open it: your domain followed by /robots.txt.
  2. Look for a Disallow: / on its own, with nothing after it. It blocks the whole shop. It is the mistake of a shop that went live with its test configuration.
  3. Check that it does not block the theme’s image, CSS or JavaScript folders. Google needs to see them to understand how the page looks.
  4. Check that the Sitemap: line points to your real sitemap.
  5. If you have rules added by hand, check that they do not block categories or products.

What to check in the sitemap

  1. In Search Console, under Sitemaps, check that the submitted one is read without errors and how many URLs it has.
  2. Compare that number with your active products and categories. If there are many more, there is junk; if there are many fewer, pages are missing.
  3. Open the sitemap and look for disabled products or empty categories. They should not be there.
  4. Check that it only contains the main version of each page, not filter or duplicate URLs.
  5. Look at the date it was last generated.
What to check in the PrestaShop sitemap and robots.txt
Five minutes each.

Want to know whether this affects your shop?

Leave us your URL. We review it and tell you what we find and what it is costing you, with no commitment.

We reply within 24 working hours.

The most costly mistakes

Mistake What happens
Disallow: / inherited from testing Google stops crawling the whole shop
Blocking pages in robots.txt that are already indexed Google cannot read the noindex and the URL stays
A sitemap that does not regenerate New products take a long time to be discovered
A sitemap with disabled products Google crawls 404 errors
The old domain’s sitemap after a migration Google keeps crawling URLs that no longer exist
robots.txt that blocks CSS or JavaScript Google does not see the page as the customer does

The second is the most treacherous: to remove filter URLs that are already indexed from Google, you first add noindex or a canonical and let Google read them. Only afterwards, if needed, do you block them. We explain it in faceted search and SEO in PrestaShop.

What changes when they are right

PrestaShop sitemap and robots.txt forgotten or under control
What changes.

Google finds new products the same day they are published, does not crawl carts or internal searches, and the Search Console indexing report can be read without noise. We cover it in PrestaShop pages Google does not index.

The order of work

The order of work for the PrestaShop sitemap and robots.txt
From the check to the routine.

What a healthy robots.txt looks like

This is a simplified example of what you should see in a PrestaShop shop in Spanish and English. It is not for copying as is, because every shop has its own modules and routes, but it is useful for comparison:

User-agent: *
Disallow: /*?order=
Disallow: /*&order=
Disallow: /*?q=
Disallow: /carrito
Disallow: /pedido
Disallow: /mi-cuenta
Disallow: /es/carrito
Disallow: /en/cart
Allow: /themes/*.css
Allow: /themes/*.js
Allow: /img/

Sitemap: https://www.yourshop.com/1_es_0_sitemap.xml
Sitemap: https://www.yourshop.com/1_en_0_sitemap.xml

What you should see: pages with no value in Google are blocked, such as the cart, order, account or sort options; theme files and images are allowed; and the sitemaps for each language appear. What should not appear: a Disallow: / on its own, blocks on category or product folders, or sitemaps from an old domain.

How often to review them

You do not need to look at them every week. It is worth reviewing them at these moments:

  1. After every migration or domain change. That is when old sitemaps and test robots files slip through most.
  2. After enabling or removing a language.
  3. After installing a filter, search or SEO module, which sometimes add their own rules.
  4. When Search Console warns of pages blocked by robots.txt that should not be, or of sitemap errors.
  5. Once a quarter, comparing the number of URLs in the sitemap with active products and categories.

Search Console also has a robots.txt report, in the settings section, showing which version of the file Google has read and when. If you change the file and Google is still reading the old version, you will see it there.

What breaks if you get it wrong

  • Copying a robots.txt from the internet. Every shop has its own modules and languages.
  • Using robots.txt to “remove” pages from Google. It does not do that.
  • Putting every possible URL in the sitemap, including filters and combinations.
  • Having two sitemap modules generating different lists.
  • Not looking again after an update, a theme change or a migration.

In short

  1. The sitemap helps discover pages; it does not guarantee they get indexed.
  2. robots.txt controls crawling, not indexing; noindex is for taking pages out of Google.
  3. PrestaShop generates robots.txt from Traffic & SEO; the sitemap needs a module with automatic regeneration.
  4. Review after migrations, new languages and filter or SEO modules.
  5. Every quarter, compare the sitemap URLs with active products and categories.

When you cannot do this yourself

Opening robots.txt, looking for Disallow: / and checking the sitemaps report in Search Console is something you can do. Deciding what to block and what not, cleaning filter URLs out of the index without breaking anything, setting up automatic sitemap regeneration and keeping it consistent with canonicals needs someone who knows PrestaShop technical SEO. That is what we do as a PrestaShop SEO agency.

Want to know whether this affects your shop?

Leave us your URL. We review it and tell you what we find and what it is costing you, with no commitment.

We reply within 24 working hours.

Frequently asked questions

Where is robots.txt generated in PrestaShop?

In the back office, in Shop Parameters, Traffic & SEO, at the bottom of the page. Regenerate and review it after installing modules, adding languages or updating the shop.

Does PrestaShop create the sitemap automatically?

Not out of the box. It is done with a module, such as the official Google sitemap, which has to be configured to regenerate with a scheduled task.

Can robots.txt be used to remove pages from Google?

No. Google states that robots.txt is not a mechanism for keeping a page out of its results. The noindex tag is used for that, and the page has to be crawlable for Google to read it.

Which URLs should a shop’s sitemap contain?

The main version of the pages you want in Google: categories, active products, brands and content pages. It should not contain filters, duplicates or disabled products.

Where is the PrestaShop sitemap?

With the official module, sitemaps are created in the shop’s root, one per language, with a name that includes the language code. The exact path appears in the module’s settings and is the one to submit to Search Console.

Do you have to submit the sitemap to Google every time it updates?

No. Submit it once in Search Console and let the module regenerate it automatically. Google reads it again on its own.