E-commerce
September 17, 2026
Wondering how to control your store's indexing with robots.txt? The answer is simple: the Robots Exclusion Protocol (REP) allows you to tell search engines which pages to crawl and index, and which to ignore. This is essential to prevent pages like the shopping cart or user profiles from diluting your SEO.
But beware, this protocol has its limits: respectful bots follow your instructions, but malicious bots do not listen to them. A syntax error can also block your entire site. So, how do you properly use robots.txt, sitemaps, and meta tags to guide Google? On the agenda:
What is the Robots Exclusion Protocol and why is it crucial for your SEO?
How to structure an effective robots.txt file for your store?
What mistakes to avoid to prevent blocking your entire site by accident?
How to use XML sitemaps to guide crawlers to your key pages?
What is the difference between noindex, nofollow, and robots.txt directives?
Let's get started.
Summary
Why is the robots exclusion protocol crucial for your SEO?
Indexing is the first step before ranking in search results. If Google cannot crawl your pages, it cannot index them, and therefore cannot rank them. The Robots Exclusion Protocol (REP) gives you control over this process: you can allow or block crawlers on certain parts of your site.
This is particularly important for an e-commerce store, where you have pages you do not want to see in the results, such as the cart, thank you pages, or customer profiles. By excluding them, you prevent them from wasting your crawl budget and diluting your authority.
The REP includes several tools: the robots.txt file, XML sitemaps, and meta tags like noindex. Each has its strengths and weaknesses, and you can combine them for fine-grained control. But remember: bot compliance is voluntary. Good bots, like those of Google and Bing, respect your directives, but malicious bots, like scrapers, do not listen to them. For those, protection at the server level is required.

Convert over 2,000 customers on average per month with Qstomy.
The world’s 1st Shopify AI dedicated to customer conversion



Empowering 200+ e-commerce merchants
How does the robots.txt file work to guide crawlers?
The robots.txt file is the first thing good bots look at on your site. It is always found at the same address, for example yoursite.com/robots.txt. This file contains simple instructions: a user-agent (the bot concerned) and a directive (Allow or Disallow).
The most common form for an e-commerce site is:
The asterisk means "all bots", and the empty Disallow directive indicates that nothing is forbidden. You can also target a specific bot, for example Googlebot, and disallow the entire site, but this would prevent you from ranking. In practice, you use robots.txt to block entire sections, like /cart or /account, while allowing specific pages within those sections.
Each protocol (HTTPS, HTTP), domain, and subdomain requires its own robots.txt file. If you have a shop on shop.yoursite.com, the file on yoursite.com does not apply. Always test your changes with the Google Search Console testing tool before publishing them.
Which syntax errors can block your entire site?
The syntax of robots.txt is simple, but an error can be catastrophic. For example, if you write Disallow: / for all bots, you block all crawling, and therefore all indexing. Your store disappears from search results.
Another common mistake is forgetting the asterisk or misplacing directives. Rules are hierarchical: the first rule that matches a user-agent is applied. If you have multiple blocks, order matters.
To avoid these pitfalls, always test your file before putting it online. Google Search Console offers a testing tool that simulates Googlebot's behavior. Also, remember to check that your file does not accidentally block your sitemaps or your CSS and JavaScript resources, as this would harm the rendering of your pages.
How to use XML sitemaps to complement robots.txt?
After consulting robots.txt, crawlers turn to your XML sitemap. This file lists the important URLs of your site, along with information such as the last modification date, change frequency, and priority. This is an excellent way to guide bots to your product and category pages.
For an e-commerce site, it is crucial to list only canonical URLs—the ones you want to rank—and not duplicates. Update your sitemap regularly, ideally in an automated way, and keep the size under 50 MB and the number of URLs under 50,000.
If your store exceeds 50,000 URLs, create multiple sitemaps and link them in a sitemap index. You can also compress them with gzip. Do not forget to include your sitemap URL in robots.txt and submit it to Google Search Console and Bing Webmaster Tools.
What is the difference between noindex, nofollow, and robots.txt directives?
The robots.txt directives and meta robots tags act at different levels. robots.txt controls crawling, while meta tags control indexing and link following. For example, noindex requests not to index the page, but the bot can still crawl it to read the content.
The nofollow tag requests not to pass authority from the links on the page. You can also use follow to allow link following even if the page is not indexed. These directives apply on a page-by-page basis, but you can insert them into a template to apply them to all pages in a section.
For individual links, the rel="nofollow" attribute on an anchor prevents the passing of link juice. This is useful for links to login pages or forms. By combining robots.txt, sitemaps, and meta tags, you get precise control over your SEO.
How to prevent sensitive pages from being indexed by Google?
Pages like the cart, thank you pages, or user profiles should not appear in search results. To block them, you have two options: exclude them via robots.txt or use the noindex tag.
Robots.txt prevents crawling, but if a page is already indexed, it may remain in the index. The noindex tag is more effective for removing a page from the index because it tells the bot not to index it, even if it crawls it. For sensitive pages, preferably use noindex.
Also consider URL parameters, such as session IDs or sorting filters. They create duplicates that waste your crawl budget. Use the parameters in Google Search Console to tell Google how to handle these URLs, or add rules in robots.txt to block them.
Why does each subdomain need its own robots.txt?
If your store uses subdomains such as shop.yoursite.com or www.yoursite.com, each must have its own robots.txt file. The file on yoursite.com does not apply to shop.yoursite.com, even if the content is identical.
This is a common source of errors: people modify the robots.txt of the main domain and forget about the subdomains. As a result, bots will crawl sections you wanted to block, or conversely, they won't find your sitemaps.
For each subdomain, create a tailored robots.txt file with the appropriate directives. If you use a CDN or a hosting provider that manages multiple domains, verify that each entry point has its own file. Test regularly to ensure everything works.
How to test your robots.txt file before publishing it?
Before putting a new robots.txt online, test it with the Google Search Console testing tool. This tool simulates the behavior of Googlebot and shows you which URLs are blocked or allowed. It is essential to avoid catastrophic errors.
You can also use the robots.txt tester in Bing Webmaster Tools. Test several scenarios: a URL of your homepage, a product page, a category page, and a page you want to block. Verify that the directives are correctly interpreted.
Do not forget to test after every modification, especially if you add complex rules. A simple typo can block your entire site. Get into the habit of testing before deploying, and keep a backup of the old version so you can roll back.
How to integrate sitemaps into your crawl strategy?
XML sitemaps are an essential complement to robots.txt. They tell crawlers which pages are important and should be crawled as a priority. For an e-commerce store, this includes your product, category, and blog post pages.
For an effective strategy, only list canonical URLs, avoid duplicates, and update your sitemap with each product addition. Use a plugin or script to automatically generate the file, and submit it to Google Search Console and Bing Webmaster Tools.
You can also include images and videos in your sitemaps to improve their discovery in image and video search. This can increase your visibility. Remember to check the accuracy of your sitemaps at least once a quarter, as they tend to contain outdated URLs.
What are the best practices for combining robots.txt and meta tags?
For optimal control, combine robots.txt, sitemaps, and meta tags. Use robots.txt to block the crawling of entire sections, such as filters or parameters, and use noindex for pages you want to remove from the index.
For example, for a thank-you page, use noindex so that it is not indexed, but leave it crawlable so that bots can follow the links. For login pages, you can block them in robots.txt, as they have no SEO value.
Regularly test your configuration with Google and Bing tools. A good practice is to create a simple robots.txt file and let it evolve gradually. Avoid overly complex rules that can lead to confusion. And don’t forget to monitor crawl errors in Google Search Console.
How does Qstomy help optimize your crawl strategy?
Qstomy, the Shopify AI agent, does not just improve the shopping experience: it can also help you identify pages to exclude from crawling. By analyzing visitor behavior, Qstomy detects pages that generate unqualified traffic, such as filter or internal search pages.
Thanks to its recommendations, you can decide to block them in robots.txt or add noindex tags. Qstomy also helps you understand which pages deserve to be highlighted in your sitemaps, based on conversions and engagement.
By integrating Qstomy into your SEO strategy, you save time and avoid mistakes. The agent guides you step-by-step to configure your files and alerts you in case of any issues. It is a valuable ally for Shopify merchants who want to master their technical SEO.
What checklist should you use before modifying your robots.txt?
Before modifying your robots.txt file, follow this checklist to avoid errors:
Back up the old version so you can revert if needed.
Test with the Google Search Console tool before publishing.
Verify that your sitemaps are accessible and not blocked.
Ensure that CSS and JavaScript resources are not blocked.
Monitor crawl errors after going live.
In brief
The robots exclusion protocol is a powerful tool to control the indexing of your store. Use robots.txt to guide crawlers, sitemaps to signal your important pages, and meta tags to fine-tune indexing. Always test before publishing.
FAQ
Can I use robots.txt to block a page that is already indexed? No, robots.txt prevents crawling, but not indexing. Use noindex to remove a page from the index.
How long does it take for Google to take changes into account? It can take from a few days to several weeks. Use the URL inspection tool to speed things up.
To go further: Integrating customer service answers into an e-commerce SEO strategy useful to customers - Qstomy, E-commerce SEO strategy for category pages - Qstomy, Using AI in your SEO strategy: Google framework, Shopify Magic, and governance - Qstomy, How to optimize an e-commerce site for Google (step-by-step guide) - Qstomy, Optimizing your SEO strategy with AI: Google framework, processes, and Shopify - Qstomy, Building your SEO strategy: adapting to succeed - Qstomy, Can Wix be used for an e-commerce site? - Qstomy.

Enzo
September 17, 2026


