Robots.txt on Shopify: what you can edit and common mistakes
An audit throws up a robots.txt warning, and the urge is to edit Shopify’s file until it goes away. Don’t. Robots.txt controls crawling, not indexing, and a rule that looks tidy can block URLs Google needs to see.
Shopify lets you customise the file through a robots.txt.liquid template. That doesn’t mean every store needs to. I’d start by identifying the real crawl issue, work out what a proposed rule would do, and test it before treating robots.txt as a place to hide pages.
Key takeaways
- Robots.txt manages crawler access; it is not a reliable deindexing tool.
- Shopify’s default rules are there for a reason; inspect them before changing anything.
- Use a custom
robots.txt.liquidonly for a documented need. - Test important product, collection, filter and sitemap paths after an edit.
Understand the job of robots.txt
A robots.txt file gives instructions to crawlers about which paths they may request. It does not protect private information, and a blocked URL can still appear in search if Google discovers it through links or other signals. The crawler simply may not be able to fetch the page and read a noindex directive or canonical tag placed there.
That distinction causes many mistakes. If a page should be crawled but kept out of search, robots.txt is the wrong control. If it should consolidate to another URL, a canonical or redirect fits better. Decide the outcome first, then pick the signal.
Robots.txt also does not apply equally to every crawler. Rules are requests, not a password. Never rely on them to keep customer data, admin pages or sensitive information secret.
What Shopify provides
Shopify generates a robots.txt file for the store. Its default rules account for common platform paths and help manage crawling of things such as filtered or internal URLs. For many stores, the default is sufficient and does not need editing.
The theme template gives you control, and with it responsibility. A typo or broad disallow can affect more than the URL you meant. Treat it like any other production change: review it and test it.
Before editing, open the live robots.txt and save a copy of the current output. Read what rules already exist and guess why they’re there. Then write down the exact crawl problem you’re solving. “An audit says blocked” isn’t enough, because audits flag URLs that are blocked on purpose.
Find the URL pattern, not just one URL
A robots rule usually affects a pattern. On Shopify, query parameters for sorting, filtering or pagination can generate many URL variations. Some may be low-value or duplicate, but others can lead to products that need to be discovered. A blanket rule may block both.
Use Search Console, a crawl of the site and a sample of actual URLs to understand the pattern. Check representative product pages, collection pages, search URLs and filtered combinations. Ask whether Google needs to crawl the page to reach useful content or see a directive on it.
If the issue concerns duplicate or near-duplicate pages, decide whether canonicalisation, internal link control, a noindex where appropriate, or a platform-specific setting is the better path. Robots.txt can reduce wasted crawling in some cases, but it cannot replace a complete URL strategy.
Make the smallest safe change
When a custom rule is justified, add the narrowest pattern that fixes the issue. I don’t copy a block from another store without understanding its URL structure, because a pattern that works on one catalogue can catch product pages or collections on another.
Keep the template readable and comment on the reason for non-obvious rules. Have a second person review the intended match if possible. Back up the current theme before changing the file, and make the edit during a window when someone can check the site afterwards.
If you’re unsure how a rule matches URLs, don’t deploy it to see what happens. Test it against representative URLs with a robots.txt tester or somewhere safe. You want to stop unwanted crawling without blocking pages that help discovery.
Verify the result
After publishing, fetch the live robots.txt file again. Check that the new output contains the rule you intended and no unexpected changes. Test both URLs you meant to block and important URLs that should remain crawlable.
Then use URL Inspection in Search Console for a representative page. Remember that changes take time to be recrawled, and the robots file is only one part of indexing. Check canonical tags, internal links, sitemaps and page-level robots directives as well.
Watch the crawl and indexing reports after deployment. If discovery or indexing shifts unexpectedly, revert the rule and investigate before another broad edit. A short change log makes this much easier to diagnose.
A decision before you touch the file
Ask what should happen to the URL: be crawled and indexed, crawled but not indexed, consolidated, or blocked from crawling. Those are different outcomes. Choose a tool only after you have chosen the outcome.
Shopify gives you the option to customise robots.txt, but the safest edit may be no edit at all. What exact URL pattern are you trying to control?