Every Shopify store ships with a robots.txt file that is already set up for search, so for most DTC brands the right move is to leave it alone and fix crawl problems elsewhere. Edit it only for a specific, proven reason, and do it through the robots.txt.liquid template so Shopify keeps maintaining the rest. This guide covers what the file does, what the default blocks, how to change it, how to test the change and which mistakes cost revenue.
TL;DR
- Robots.txt tells crawlers which URLs they may request. It is not a way to keep a page out of Google or to protect private content.
- Shopify’s default file blocks cart, checkout, account, order, sorted and filtered collection URLs. It is built for SEO, so most stores need no change.
- To customize, add a
robots.txt.liquidtemplate. Do not replace the file with plain text. - Test every change, expect Google to take up to 24 hours to pick it up, and never disallow
/products/or/collections/. - A wrong rule can wipe out organic traffic, so treat edits like a code release.
Table of Contents
- What robots.txt does on a Shopify store
- What Shopify’s default file blocks, and why
- When you actually need to change it
- How to edit robots.txt on Shopify
- Rules that damage a Shopify store
- Blocked, indexed, noindex: getting it straight
- How to test a robots.txt change
- Worked example: a filtered catalog
- Our perspective
- Getting the file reviewed
- FAQ
- Sources
What robots.txt does on a Shopify store
Robots.txt is a plain text file at yourstore.com/robots.txt. It lists rules for crawlers, the bots that search engines send out to read your pages. According to Shopify’s Help Center, the file tells those bots which pages to request from your online store, and every store gets a default file that is optimal for SEO.
Two terms matter here:
- Crawling is when a bot such as Googlebot reads the content and code of a page.
- Indexing is when a page becomes eligible to appear in search results.
Robots.txt controls only the first. Google’s documentation says the file is used mainly to avoid overloading a site with requests and is not a mechanism for keeping a page out of Google. A blocked URL can still be indexed if other sites link to it, usually showing up without a description.
That distinction explains most of the confusion store owners have. Blocking a URL does not remove it from search. It only stops Google from reading it.
What Shopify’s default file blocks, and why
Shopify’s Help Center lists the key default rules. Here they are in plain terms:
| Rule | What it does | Why |
|---|---|---|
Allow: / |
Lets crawlers request public content: products, collections, pages, blog posts, policies | Your sellable content must be crawlable |
Disallow: /admin |
Keeps admin pages uncrawled | Crawlers cannot reach them anyway |
Disallow: /cart/ |
Blocks cart links | Each cart is unique to a customer |
Disallow: /checkout and /checkouts/
|
Blocks checkout pages | Private, no search value |
Disallow: /account and /orders
|
Blocks customer-specific pages | Private, no search value |
Disallow: /collections/*+* |
Blocks filtered collection pages | They duplicate collection content |
Disallow: /collections/*sort_by* |
Blocks sorted collections | Same products, different order |
The logic, per Shopify, is to help search engines focus on unique content instead of administrative or duplicate pages. Shopify’s page on hiding a page from search engines adds that every store has a preconfigured, optimized template and that no changes are needed unless you have a specific reason.
If you open your own /robots.txt, you will also see a sitemap line pointing to your sitemap and a separate group of rules for Google’s ads crawler. Both are normal.
A common false alarm: policy pages
Merchants often spot their policy pages (returns, shipping) flagged as blocked and assume something broke. Shopify’s own help page on pages blocked by robots.txt explains this is by design, since those pages rarely help shoppers searching for products. Nothing needs fixing.
When you actually need to change it
For a brand scaling on Shopify, the honest list of reasons is short:
- Crawl waste from parameter URLs. Internal search results, tag combinations or filter URLs that the default does not cover can eat crawl attention on a large catalog.
- A specific crawler you want to slow or exclude. Shopify’s guide lists crawl-delay rules and blocking particular bots among the supported changes.
- An extra sitemap you need to declare.
- Cleaning up after a migration. Old workarounds from a previous platform can conflict with the new file. Our Shopify migration plan covers how to protect SEO during that move.
If your problem is a slow site, thin collection pages or weak product copy, robots.txt will not fix it. Start with the Shopify SEO checklist, which puts 30 checks in the order that moves rankings.
How to edit robots.txt on Shopify
Shopify supports editing through a Liquid template called robots.txt.liquid. Per the Help Center guide:
- From your admin, go to Online Store > Themes.
- Next to your live theme, open the menu and choose Edit code.
- Choose Add a new template, select robots, and click Create template.
- Edit the template using Liquid.
The template does not start empty. It loops through Shopify’s default rule groups and prints them, which means Shopify can keep updating the defaults while you layer changes on top. Shopify’s developer documentation describes the file as rule groups, each with a user agent (the crawler a group applies to), its rules and an optional sitemap URL. Adding the template replaces Shopify’s generated output, which is why the default loop matters.
Adding a rule
A typical customization keeps the default loop and appends one rule to the group for all crawlers:
{% for group in robots.default_groups %}
{{- group.user_agent }}
{%- for rule in group.rules -%}
{{ rule }}
{%- endfor -%}
{%- if group.user_agent.value == '*' -%}
{{ 'Disallow: /search' }}
{%- endif -%}
{%- if group.sitemap != blank -%}
{{ group.sitemap }}
{%- endif -%}
{% endfor %}
The example uses /search because internal search result pages are a common candidate. Swap in your own path only after you have confirmed that path never carries pages you want ranked. Shopify’s rule object reference shows that each rule is a directive (Allow or Disallow) plus a path value, such as Disallow: /policies/.
Removing a default rule works the other way: adjust the loop to skip that rule when printing. Do this rarely. The defaults exist for reasons listed above.

What not to do
Shopify says plainly that replacing the template with plain text rules is strongly not recommended, because the rules can go out of date and Shopify cannot keep SEO best practices current for you. The same guide notes that:
- The customization is unsupported by Shopify Support.
- Incorrect use can result in loss of all traffic.
- You should remove earlier workarounds, such as rules set at a proxy layer, before you start.
Because of that risk, save a copy of your current /robots.txt before publishing and compare it against the rendered output of your template, as the developer docs advise.
Rules that damage a Shopify store
Google matches paths by prefix, so a short rule can reach much further than you intend. These are the patterns that hurt most:
-
Disallow: /blocks the entire site. Crawling stops and pages drop from results over the following weeks. -
Blocking
/products/or/collections/removes your revenue pages from the crawl. A bareDisallow: /collections/*catches every collection. -
Blocking theme assets such as scripts and styles under
/cdn/shop/. Google’s guidance is not to block resources when their absence makes the page harder for the crawler to understand, and a page Google cannot render properly is a page it cannot judge properly. If your store is already slow, fix that at the source with speed optimization rather than by hiding assets. - Using Disallow to deindex a page. See the next section.
- Using Disallow as security. Robots.txt is a public file. Anyone can read it, so listing a path advertises it. Google’s documentation says to use other methods, such as password protection, for private content.
Blocked, indexed, noindex: getting it straight
The most counterintuitive rule in this topic: if you want a page out of search results, do not block it in robots.txt. A crawler that cannot fetch the page cannot see a noindex tag on it. Google’s documentation says to keep a page out of results by using a noindex meta tag or response header, password protection, or removing the page.
The working sequence for each situation:
| Situation | What to do |
|---|---|
| Page should rank but is blocked | Remove or narrow the Disallow rule, then request indexing in Search Console |
| Page should disappear from results | Unblock it, add a noindex tag, wait until Google recrawls, then decide whether to block |
| Page is private | Use access controls, never robots.txt |
Search Console sometimes reports “Indexed, though blocked by robots.txt.” Shopify’s guide says this is normal and usually not a concern, since many pages are intentionally blocked. If a normal page such as your homepage shows it, Google’s data is often outdated, and it can take days, weeks or months to update. In most cases no action is needed.
How to test a robots.txt change
Shopify applies changes instantly, but crawlers do not react immediately. Use this routine:
-
Read the live file. Open
yourstore.com/robots.txtin a browser, as Google’s documentation suggests. Look for a loneDisallow: /, a sitemap line that points to your real sitemap and any rule that touches/products/or/collections/. - Check the diff. Compare it with the copy you saved before editing.
- Confirm in Search Console. The robots.txt report shows when Google last fetched the file and any errors. URL Inspection tells you whether robots.txt allows crawling of a specific page.
- Request a recrawl if you unblocked something. Google’s crawlers refresh their cached copy about every 24 hours, and the Request a recrawl option in the robots.txt report speeds that up. It does not guarantee your pages will be crawled right away.
- Recheck after a day or two. A test run within hours of the edit may reflect the cached version.
Monitor the Pages report in Search Console over the next few weeks. Rule mistakes show up there as pages leaving the index well before they show up in revenue.
Worked example: a filtered catalog
Imagine a 600-product apparel store with color, size and tag filters. The default already blocks sorted collections and multi-filter URLs with a plus sign. The team notices Search Console crawling a large number of internal search URLs that return the same products in various orders. The sensible fix is one added line for /search in the * group via robots.txt.liquid, tested against the saved copy, then watched for two weeks. The unsafe fix is a broad block on /collections/, which would also remove the category pages that earn the store’s non-brand traffic.

The lesson: change the narrowest path that solves the measured problem.
Our perspective
Most robots.txt trouble we see in the Shopify context is self-inflicted. Someone wants to tidy up crawling, edits the file, and nobody checks the result against the pages that earn revenue.
Our view is that robots.txt is the smallest lever in technical SEO and one of the easiest to get wrong. Page speed, clean collection structure, correct metadata and a healthy sitemap move rankings. A robots.txt edit should be the last, narrowest step, made inside the template Shopify maintains.
That is why we work on fixed-fee engagements. A technical SEO review has a clear scope, a clear price and a clear before and after, so a change like this one is judged against your indexed pages and sales and not against a hunch.
Jason
Getting the file reviewed
If your store has a large catalog, heavy filtering, or a history of migrations, a one-time review of robots.txt alongside sitemap, indexation and crawl patterns is the safest route. Our Shopify SEO Services engagement is a fixed fee of $999, one-off, and sits with the rest of the ecommerce marketing services we offer DTC brands.
If slow pages are also holding back crawling and conversion, pair it with our Shopify Speed Optimization service, listed at $1,999 one-off.
FAQ
Can I edit robots.txt in Shopify?
Yes. Add a robots.txt.liquid template under Online Store > Themes > Edit code, then use Liquid to add or remove rules. This keeps Shopify’s automatic updates to the defaults. Shopify Support does not cover this customization, so test carefully.
Does disallowing a page remove it from Google?
No. Google states that a disallowed URL can still be indexed if other sites link to it, typically without a description. To remove a page, unblock it, add a noindex tag or header, and let Google recrawl.
Why does Search Console say a page is blocked by robots.txt?
Often because Shopify blocks it on purpose, such as cart, checkout, account and policy pages. Shopify says this status is usually not a concern. Act only if a page that should rank is blocked.
How long until Google sees my robots.txt change?
Shopify publishes it instantly. Google’s crawlers refresh their cached copy about every 24 hours, and the Request a recrawl option in Search Console can speed that up. Crawling of the affected pages may still take longer.
Should I block AI crawlers or add extra rules?
Only if you have a business reason. You can add user-agent groups through the same template. Keep the default loop, add the narrowest rule that fits, and check the live file afterward. Remember that not every bot follows robots.txt.
Sources
- Shopify Help Center: Editing robots.txt.liquid
- Shopify Help Center: Hiding a page from search engines
- Shopify developer docs: Customize robots.txt
- Shopify Liquid reference: rule object
- Google Search Central: Robots.txt introduction and guide
- Google: Create and submit a robots.txt file
- Google: Updating your robots.txt file
