Catalog Audit

Audit tool / Guides

How to Edit robots.txt on Shopify (and When You Shouldn't)

By Evan Walter · Updated 2026-11-27

Every Shopify store already has a robots.txt file, and Shopify describes the default as optimal for SEO. To change it, add a robots.txt.liquid template to your theme in Online Store > Edit code. Most stores should not do this. Shopify labels it an unsupported customization, and a mistake can block search engines from your whole store.

What the default file does

Shopify's help center says the default rules allow public content and block admin, cart, checkout, account and order URLs, plus filtered and sorted collection URLs. Those pages are either private or unique to each customer, so search engines gain nothing from crawling them. To see your own file, open yourstore.com/robots.txt in a browser. The audit also reads this file when it checks your store.

If your problem is a product that is missing from Google, robots.txt is rarely the cause. Start with the product not showing on Google checklist.

Reasons people customize it

Shopify's help center lists what you can change: allow or disallow certain URLs, add crawl-delay rules for specific crawlers, add extra sitemap URLs, and block certain crawlers. If none of those applies to you, leave the default alone.

Before you start

Step 1: Create the template

  1. In your Shopify admin, go to Online Store.
  2. Find your theme, click the horizontal menu icon, then choose Edit code.
  3. Click Add a new template, select robots, then click Create template. (Shopify's developer docs describe the same result as a robots.txt.liquid file in the Templates folder.)
  4. Edit the template, then save it in your published theme.

Shopify strongly recommends against replacing the template with plain-text rules. Those rules can go out of date and won't get Shopify's future SEO updates. Instead, keep the default Liquid loop that outputs robots.default_groups and add to it.

Step 2: Make a small change

Shopify's developer documentation shows these patterns, using the supported Liquid objects robots, group, rule, user_agent, sitemap and request:

Copy the full example from Shopify's developer documentation rather than typing it from memory, and change one thing at a time.

Step 3: Check the result

Open yourstore.com/robots.txt and compare it with the copy you saved. Make sure the rules you expected are there and nothing you did not intend is missing. Shopify notes that crawlers don't always respond to changes immediately, and suggests testing with Google's robots.txt tester.

How to revert

Go to Online Store, click the horizontal menu icon for your theme, choose Edit code, right-click robots.txt.liquid, select Delete permanently, then click Delete. Shopify says this restores the current default file, which can also drop outdated rules that older template versions carried.

Related

robots.txt controls crawling, not whether a page is indexed or how it ranks. If you are fixing duplicate URLs, see duplicate product URLs and canonical tags. Once your sitemap is in order, submit it to Google Search Console.

Check your own store in 20 seconds

The free Catalog Audit for Shopify stores scans up to 1,000 products for empty or thin descriptions, duplicate titles, missing alt text and more, then links each issue to a fix.

Prefer to hand it off? I'm Evan, a software engineer who works on Shopify stores. Leave your email and store URL and I'll reply with a short, prioritized fix list. Free, no obligation.