Heads Up, Shopify Store Owners: Your Custom Robots.txt Might Be Accidentally Hurting Your SEO!

Hey everyone,

I wanted to bring something really important to your attention, fresh out of the Shopify community forums. It's about your store's robots.txt file, and a potential hiccup that could be quietly affecting your search engine optimization (SEO) without you even knowing it.

Think of your robots.txt file as a polite instruction manual for search engine bots (like Googlebot) telling them what parts of your website they can and can't crawl. It's super important for managing your crawl budget and making sure search engines focus on your most valuable content. Messing this up can mean important pages don't get indexed, or worse, non-essential pages waste your crawl budget.

A Deep Dive into a Community Discovery

Recently, a sharp-eyed member of the Shopify community, Enrick_SEO, reported a significant mismatch between the default robots.txt file Shopify serves and the Liquid variable robots.default_groups, which many of us use to build custom robots.txt.liquid templates.

Here’s the core of the issue: If you’ve followed Shopify’s official documentation to customize your robots.txt – perhaps just to add one specific rule – you might have unknowingly switched your store to an older, more restrictive set of crawling rules. Enrick_SEO's findings suggest that the robots.default_groups variable is returning an outdated version of these rules, while Shopify’s actual default robots.txt has been quietly updated to be more flexible and modern.

What's the Difference, Exactly?

Enrick_SEO laid out some pretty clear examples of these discrepancies:

  • Missing from your customized file (but present in Shopify's current default):
    • Important directives related to AI agents and agentic commerce (like UCP/MCP, agents.md). These are crucial for how new AI-powered tools interact with your store.
    • Explicit Allow rules for key pages, such as Allow: / (allowing your homepage to be crawled) and Allow: /account/login. Without these, bots might get confused.
    • Newer Disallow rules for things like /sf_*, /services, /cart.js, and /*/cart.js. These help prevent search engines from indexing pages that aren't meant for public search results, which is generally a good thing for SEO.
  • Present in your customized file (but removed from Shopify's current default):
    • Older bot groups like Nutch, AhrefsBot, AhrefsSiteAudit, MJ12bot, and Pinterest, some even with Crawl-delay directives. Shopify has likely optimized how these are handled, and including old directives might be redundant or even counterproductive.
    • Blocking of important sections like /policies/ and /search. The current default actually allows these to be crawled, which can be beneficial for showing your policies in search results or allowing search engines to understand your site structure better. Blocking them could hinder discoverability.

The kicker is, you might think you're just extending the default, but you're actually replacing it with something different. And potentially, something less optimal for today's search landscape.

Are You Affected? How to Check Your Store

This is where you need to take action. If you’ve ever touched your robots.txt file on Shopify, it’s crucial to verify its current state.

Step 1: Check if you have a custom robots.txt.liquid file

First, log into your Shopify admin:

  1. Go to Online Store > Themes.
  2. Find your current theme, click Actions > Edit code.
  3. In the left sidebar, look under the Layout folder for a file named robots.txt.liquid.

If this file exists, you have a custom robots.txt. If it doesn't exist, Shopify is serving its default, and you're likely in the clear (for now!).

Step 2: Examine Your Custom robots.txt.liquid Content

If you have that file, open it. Many merchants follow the recommended pattern from Shopify’s documentation, which looks something like this:

{% for group in robots.default_groups %}
  {{- group.user_agent }}
  {%- for rule in group.rules -%}
    {{ rule }}
  {%- endfor -%}
  {%- if group.sitemap != blank -%}
    {{ group.sitemap }}
  {%- endif -%}
{% endfor %}

If your file largely mirrors this structure, or you've added rules around this loop, then you're relying on the potentially outdated robots.default_groups variable.

Step 3: Compare Your Live robots.txt with Shopify's Current Default

This is the most critical step. You need to see what Shopify is *currently* serving as its default robots.txt on a fresh, uncustomized store, and compare it to what your store is serving.

To find your live robots.txt: Simply go to yourstore.com/robots.txt (replace yourstore.com with your actual domain).

To find Shopify's current default robots.txt: This is a bit trickier if you don't have a fresh Shopify store to check. You might need to temporarily remove your robots.txt.liquid file (make a backup first!) or consult with a developer who has access to a vanilla Shopify setup. Look for a recent, uncustomized Shopify store's robots.txt to use as a benchmark. You'd be looking for the inclusion of AI agent directives, explicit Allow rules, and the updated Disallow rules mentioned by Enrick_SEO.

What Should You Do If You Find a Mismatch?

If your custom robots.txt (generated via robots.default_groups) differs significantly from the current default, you have a few options:

  1. If you don't have specific custom rules: The safest bet might be to simply delete your robots.txt.liquid file. Shopify will then automatically serve its most up-to-date default robots.txt. Always make a backup of your file before deleting!
  2. If you have specific custom rules you need:
    • You could manually update your robots.txt.liquid. This would involve taking Shopify's current default rules and then adding your specific custom rules on top. This requires careful attention to detail to ensure you don't miss any critical default rules.
    • Alternatively, you could maintain your current customized file but be fully aware of the differences. If you've intentionally blocked /policies/ or other sections, and that's your SEO strategy, then you're in control. However, be mindful of the missing modern directives for AI agents, as those could become more important over time.

This situation really highlights the importance of staying on top of your store's technical SEO settings, especially when dealing with core files like robots.txt. It's a prime example of why the community is so valuable – catching these subtle but impactful discrepancies.

We're certainly hoping Shopify addresses this by updating the robots.default_groups variable to always reflect the most current default rules. Until then, a quick check of your own store could save you some potential SEO headaches down the line. Keep an eye out, and let's keep those stores optimized!

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases