T
ToolPrime

robots.txt for Shopify

Recommended robots.txt configuration for Shopify stores. Handles collection filtering, checkout, and admin pages.

robots.txt

User-agent: *
Disallow: /admin
Disallow: /cart
Disallow: /orders
Disallow: /checkouts/
Disallow: /checkout
Disallow: /carts
Disallow: /account
Disallow: /collections/*sort_by*
Disallow: /*/collections/*sort_by*
Disallow: /blogs/*+*
Disallow: /blogs/*tagged*
Disallow: /*?*variant=*
Disallow: /*?*q=*
Disallow: /*?*sort_by*
Allow: /collections/
Allow: /products/

Sitemap: https://example.com/sitemap.xml

Line-by-Line Explanation

User-agent: * — applies to all crawlers

Disallow: /admin — blocks the Shopify admin panel

Disallow: /cart, /orders, /checkouts/ — blocks shopping cart and checkout pages

Disallow: /account — prevents customer account pages from being crawled

Disallow: /collections/*sort_by* — blocks sorted collection variants (duplicate content)

Disallow: /blogs/*tagged* — prevents tag filter pages from being indexed

Disallow: /*?*variant=* — blocks individual product variant URLs

Disallow: /*?*q=* — blocks search result pages

Allow: /collections/ and /products/ — ensures product and collection pages are crawlable

Sitemap — points to the auto-generated Shopify sitemap

Best Practices for Shopify

Build a custom robots.txt for your Shopify site

Open robots.txt Generator

Frequently Asked Questions

Can I edit robots.txt on Shopify?▾
Yes. Since 2021, Shopify allows customization through the robots.txt.liquid template in your theme. Go to Online Store > Themes > Edit Code and create a robots.txt.liquid template.
Why does Shopify block so many URLs by default?▾
Shopify has many URL parameters for sorting, filtering, and variants that create duplicate content. Blocking these prevents search engines from wasting crawl budget on duplicate pages.
Should I block /collections/ on Shopify?▾
No. Collection pages are important for SEO as they act as category pages. Only block the sorted and filtered variants (with query parameters) to avoid duplicate content.

Related Templates