Shopify SEO
“Indexed, though blocked by robots.txt” on Shopify
What you’ll need
A duplicate of your theme to test on
How to get this: A duplicate of your theme to test on
- Online Store › Themes › … on your theme › Duplicate.
- Make the change on the copy, preview it, and publish only when it works.
The theme code editor (to paste a snippet)
How to get this: The theme code editor
- On the copy of your theme: … › Edit code.
- Hover the snippets folder, click New File…, name it as the tool says, paste and Save.
Why it happens
robots.txt stops Google reading a page, not listing it. If other pages link to a blocked URL, Google can still index the address, with no description.
Shopify’s default robots.txt blocks carts, checkouts, accounts, internal search parameters, sorted collections and tag-filtered collections (the + in /collections/shirts/red+cotton). Those are the URLs you’ll usually see in this report.
What to do
- Open the report in Search Console and look at the example URLs.
- Paste your robots.txt into our checker and test each URL to see which rule blocks it.
- If it’s a cart, checkout, account, search or filter URL: leave it. Nothing is wrong.
- If it’s a product, collection or page you want found: remove the rule that blocks it from robots.txt.liquid, then click Validate fix in Search Console.
- If you want a URL out of Google completely, don’t block it in robots.txt. Let Google crawl it and add a noindex tag instead; Google can only see noindex on a page it’s allowed to read.
More guides
Based on Shopify’s robots.txt.liquid docs, Shopify’s Help Center and Google’s robots.txt spec.