Shopify SEO Guide

Robots.txt for Shopify: A Practical Guide

Editing the robots.txt for Shopify feels a bit different than a standard WordPress site. You don’t just FTP in and tweak the file directly. Shopify generates...

What You'll Learn

Shopify automatically generates the core robots.txt file; you can only append custom rules.
The liquid template `robots.txt.liquid` is the only safe way to edit the file.
Blocking a URL stops crawling but doesn't automatically remove it from Google's index.
Faceted navigation (`?filter=`) is the biggest source of crawl waste on Shopify stores.
Always pair a `Disallow` rule with a `noindex` tag for pages already indexed.
Your robots.txt must explicitly list the link to your XML sitemap at the very end.
Wildcards (`*`) are powerful but dangerous; one wrong pattern can block thousands of valid products.

Your Shopify robots.txt file acts as a gatekeeper. It tells search engine bots like Googlebot which parts of your store to scan and which parts to ignore. The goal isn't to block everything; it's about being smart with your crawl budget. A messy robots.txt leads to Shopify duplicate pages SEO nightmares and wastes the limited time Google spends on your site. Let's look at how to manage it properly.

Quick Answer: How Do I Edit My Robots.txt on Shopify?

You can’t edit the core system-generated rules directly, but you can append custom commands. Go to Online Store > Themes > Actions > Edit Code. Add a robots.txt.liquid template. The default file already handles blocking internal links like the cart and checkout. Your focus here should be adding specific "Disallow" rules for faceted navigation pages or app-generated URLs that cause indexing problems.

Why Your Shopify Robots.txt Matters for SEO

Googlebot has a finite attention span for your site; we call this crawl budget. If the bot wastes time on faceted navigation pages (like /collections/shirts?color=blue), it might skip your actual product pages. I’ve seen stores where 80% of the crawled URLs were parameter-driven junk. A tight robots.txt Shopify store setup prevents this. It works hand-in-hand with canonical tags to consolidate signals, but blocking is faster than hoping Google respects a canonical.

Usually, Shopify handles the heavy lifting by default. The platform automatically blocks the checkout, cart, and internal search results. But the trouble starts when you install apps that generate new URLs, or when your theme creates infinite crawl spaces. That's when you need to jump in.

Shopify Robots.txt Example and Common Rules

A standard Shopify robots.txt looks something like what you see below. The first block is locked by Shopify. The second block is where you can add your custom instructions. Don’t try to override the system block; you can’t. You can only build upon it.

# System rules are managed by Shopify
User-agent: *
Disallow: /admin
Disallow: /cart
Disallow: /orders
Disallow: /checkouts/
Disallow: /checkout
Disallow: /carts
Disallow: /account
Disallow: /collections/*sort_by*
Disallow: /collections/*+*
Disallow: /collections/*%2B*
Disallow: /collections/*%2b*
Disallow: /blogs/*+*
Disallow: /blogs/*%2B*
Disallow: /blogs/*%2b*
Disallow: /*/articles/*+*
Disallow: /*/articles/*%2B*
Disallow: /*/articles/*%2b*
Disallow: /search
Disallow: /apple-app-site-association

# Custom rules you can edit below
User-agent: *
Disallow: /collections/fragrance*?*filter*
Sitemap: https://your-store.com/sitemap.xml

Notice the custom line blocking collection filters. That's a practical fix for a very common Shopify crawl issue.

How to Block Specific Pages from Indexing

Maybe you have a vendor page that creates duplicate content, or a collection page that you’d rather keep hidden from SERPs. You can’t rely on the “noindex” tag alone if bots are still wasting time crawling the URL.

To add a custom disallow rule, you need to edit the robots.txt.liquid file. Just remember, a "Disallow" line stops crawling, but it doesn’t stop indexing. This is a tricky part. If Google discovers that blocked URL through an internal link elsewhere, it might still index it without visiting it, showing that ugly "No information available" snippet. Usually, you want to pair a `noindex` meta tag with a `Disallow` rule for full protection.

Blocking the Shopify Blog (If You Don't Use It)

If your theme comes with a news section you never touched, block it. It’s thin content.

Disallow: /blogs/news/

Fixing Shopify Crawl Issues and Indexing Problems

Most crawling chaos on Shopify comes from two things: faceted navigation and internal search parameters. Even though Shopify tries to block some of these with patterns like /*sort_by*, some themes use different URL structures.

Check Google Search Console. If you see thousands of excluded URLs with long parameter strings, your robots.txt might be fine, but your internal links are out of control. Robots.txt is a band-aid here. The real fix is usually tweaking how your theme links to filtered options, but let's be real, that's a bigger dev task. A strict disallow pattern is a fast, safe fix.

Another thing worth checking: is your sitemap and robots.txt in sync? Your robots.txt should point clearly to your sitemap.xml. Never block the URL path that contains your sitemap.

Handling Duplicate Pages SEO on Shopify

Shopify is notorious for generating the same product page under different collection handles. For example: /collections/shoes/products/nike-air vs /collections/sale/products/nike-air. The canonical tag usually points back to the base product, which is good. But if you’ve got a specific collection path that’s creating a mess, you can use the robots.txt to disallow that specific product-under-collection path, though honestly, it’s often better to let Googlebot figure it out via canonicals unless the scale is massive and eating your crawl optimization for Shopify.

Protecting Your Store's Staging Domain

If your development store is on a myshopify.com domain and you’ve forwarded a custom domain, make sure the staging domain isn’t accessible. If you can't fully firewall it, you might want to use Liquid logic in your robots.txt to block everything if the domain isn't your primary one.

Best Practices for a Clean Robots.txt

  • Always Test: Use Google’s robots.txt tester in Search Console before publishing changes. A misplaced slash can block your entire store.
  • Don't Block CSS/JS: Shopify hosts assets on CDNs. Don’t try to control those files. Google needs them for rendering.
  • Link to the Sitemap: Your custom robots.txt should explicitly state the location of your Shopify sitemap and robots.txt file relation at the very bottom.
  • Use Liquid Logic Carefully: You can use {% if %} statements to hide rules from non-production environments, which is a nice trick for development stores.

Detailed Explanation

Understanding Shopify's Default Rules

Shopify’s default robots.txt is actually very SEO-friendly out of the box. It cleverly uses wildcards to block infinite spaces. For example, Disallow: /collections/*%2B* targets encoded characters that usually signal faceted navigation. You don't need to reinvent the wheel. Often, crawl issues start because an app injects a ?utm_source= parameter that creates new URLs faster than the robots.txt can adapt.

Why You Can't Edit the System Rules Directly

This frustrates many SEOs moving from WordPress. You cannot remove the default "Disallow: /admin" rule. Shopify locks the system section for security and platform stability. If you need to unblock a path that Shopify has globally blocked, you're out of luck. You'll have to find a different structural workaround, usually involving JavaScript rendering or app proxies.

Troubleshooting "Indexed, though blocked by robots.txt"

If you see this warning in Search Console, it means Google indexed the URL from a link anchor text or sitemap, but couldn't read the page. The usual fix is to leave the page crawlable (remove the disallow) but add a noindex tag. Once Google crawls it again, it will see the noindex and drop the page. Only block it again after de-indexing.

Examples

Basic Custom Block for Noisy Filters

Add this to stop crawling of faceted navigation that generates ?filter= parameters.

Disallow: /collections/*?*filter*
https://yourstore.myshopify.com/collections/all?filter.v.price=10-20
Blocking Collection Filter Parameters
In the robots.txt.liquid file, this line tells all user-agents to ignore collection URLs containing filter queries.
Safe to use on most stores. Check your specific filter structure first.

Blocking a Specific Vendor Page

If you dropship and a vendor page is pulling thin descriptions, block it to save crawl budget.

Disallow: /collections/vendors?q=BadVendor
https://yourstore.myshopify.com/collections/vendors?q=BadVendor
Hiding Low-Quality Vendor Pages
This prevents crawling of the auto-generated vendor collection page.
Also noindex this page via theme.liquid for complete removal.

Liquid Logic to Block Staging Domain

Prevents your .myshopify.com staging URL from being crawled if you forgot to redirect it.

{% if shop.url contains '.myshopify.com' %}
User-agent: *
Disallow: /
{% endif %}
https://yourstore.myshopify.com
Staging Environment Protection
If the active domain is the Shopify default, it completely bans all robots.
Use with extreme caution. Will kill SEO if template renders on live domain.

Disallow Specific Blog Tag Pages

Blog tag pages rarely have unique content and cause crawl bloat.

Disallow: /blogs/news/tagged/
https://yourstore.myshopify.com/blogs/news/tagged/seo
Pruning Blog Tag Pages
Stops Googlebot from crawling every single tag combination on your blog.
Add a noindex to these pages too for a cleaner index.

Best Practices

Always Keep the Sitemap URL

Your custom robots.txt.liquid must include `Sitemap: https://yourstore.com/sitemap.xml` at the bottom to guide search engines effectively.

Don't Block Crawling of Noindexed Pages Initially

If you want a page removed from Google, let it be crawled with a noindex tag first. Blocking crawling traps the page in the index.

Use Exact Match Blocking for Products

If a specific product variant string is causing issues, block exactly that path rather than a broad folder to avoid accidental exclusions.

Test With Mobile User-Agent

Google primarily uses the mobile bot. Make sure your rules apply to `Googlebot` and aren't just limited to an old desktop directive.

Limit Custom Rules to 10-15 Lines

If your custom section is huge, you’re covering up a structural site issue. Fix the internal links or faceted navigation instead.

Never Block the `/products/` Directory

Even if you use collection paths, the product directory hosts your product images and canonical URLs. Blocking it will destroy your rankings.

Monitor the `robots.txt` for App Injections

Some SEO apps automatically append rules. Occasionally audit the raw file to ensure an app hasn't accidentally blocked something important.

Coordinate with Canonical Tags

Robots.txt manages crawling, canonicals manage indexing. They must agree. Don't block a parameter if it's the canonical version of a page.

Common Mistakes to Avoid

Using `Disallow: /` in Development Stores

People copy-paste the root disallow rule to a staging site and then push the theme live. This instantly nukes your entire store from search results.

Blocking the Checkout Success Page

While you block the cart/checkout process, sometimes marketers inadvertently add rules that mess with the order confirmation tracking scripts.

Trying to Disallow JavaScript Files

Shopify assets are on CDNs. If you try to block `/assets/`, Googlebot can't render your page properly, which hurts visual-heavy queries.

Ignoring Case Sensitivity

URLs on Shopify are case-sensitive. `Disallow: /Collections/` won't block `/collections/`. Always use lowercase in your rules.

Not Removing Old App Rules

You uninstall an SEO app, but the app's injected rules remain in your liquid file, blocking resources your new setup needs.

Pro Tips

Use Search Console to Find Orphan Rules

Check the 'Coverage' report for 'Blocked by robots.txt' errors. If you see a URL you actually want indexed, your rule is too aggressive.

Stagger Your Disallow Directives

Instead of one long string, chain specific query parameters. `Disallow: /*?*sort_by=` is often cleaner than trying to block the whole string.

Check Your Sitemap Coverage

A common shopify indexing problem is including blocked URLs in your sitemap. Google ignores the sitemap entry if the robots.txt blocks it, wasting your authority.

Handle Pagination Wisely

Don't block pagination (`?page=2`) in robots.txt. Instead, use the `rel=next/prev` tags Shopify provides. Crawling pagination helps discover deep products.

Frequently Asked Questions

You find the file by going to Online Store > Themes > Actions > Edit Code. Then, you need to add a new template called `robots.txt.liquid`. Shopify doesn't give you a static file to download via FTP; it's rendered dynamically through this liquid template.

If you see this, your store is likely password protected. Shopify uses this rule to keep search engines out while you're building the store. Once you remove the password, the system block disappears automatically.

No, you can't modify or remove the rules in the locked system section. You can only add custom rules in the 'Custom robots.txt' box or liquid template. If a default rule blocks something you need crawled, you'll have to move that content to a different URL handle.

Remove the disallow rule temporarily. Then add a 'noindex' meta tag to the page. Wait for Google to recrawl the page and see the noindex. Once the page drops from the search results, you can re-add the disallow rule to stop it from wasting crawl budget.

Almost never. Collection pages are your main money-making landing pages. Only block a specific collection if it's a thin, auto-generated page with no editorial value. For general duplicate concerns, trust the canonical tag linking back to the main collection URL.

The change is instant on your server, but Googlebot doesn't check the file daily. It can take a few days to a couple of weeks for Google to recrawl your robots.txt. You can speed this up by using the 'Submit' function in the Google Search Console robots.txt Tester tool.

A correct robots.txt doesn't directly change your speed score. However, if you accidentally block your CSS and JavaScript assets files in the CDN, Googlebot can't render the page properly, which can negatively affect your ranking signals.

Ready to Optimize Your SEO?

Use our free tools to audit and improve your website instantly

Was this guide helpful?

Methodology
Practical SEO expertise
Last updated
2026-07-22T06:23:34.925140
Disclaimer
Results may vary by industry