How to Edit Robots.txt in Shopify (2026 Guide + Fix Indexing Issues)

How to Edit Robots.txt in Shopify (2026 Guide + Fix Indexing Issues)

If you’re trying to remove or modify the robots.txt file in Shopify, you’re not alone. Many store owners face indexing issues and assume deleting the robots.txt file will fix everything.

However, Shopify doesn’t allow you to completely remove the robots.txt file β€” but you can edit and control it.

In this guide, you’ll learn exactly how to edit robots.txt in Shopify and fix common SEO issues.


What is Robots.txt?

Robots.txt is a file that tells search engines:

  • Which pages to crawl
  • Which pages to ignore

It helps control how Google interacts with your Shopify store.


Can You Remove Robots.txt in Shopify?

No β€” you cannot remove it completely.

Shopify automatically generates a robots.txt file for every store.

Example:

User-agent: *
Disallow: /admin
Disallow: /cart

What You Can Do Instead

You can:

  • Edit robots.txt
  • Allow or disallow specific pages
  • Fix indexing issues

How to Edit Robots.txt in Shopify

  1. Go to your Shopify Admin
  2. Click Online Store β†’ Themes
  3. Click Edit Code
  4. Search for robots.txt.liquid
  5. Add your custom rules

Example Custom Code

User-agent: *
Disallow: /collections/all
Allow: /collections/custom-products

Common Use Cases

Fix Duplicate Content

Disallow: /collections/all

Allow Important Pages

Make sure product pages are crawlable.


Mistakes to Avoid

  • Blocking important pages
  • Removing product URLs
  • Over-blocking search engines

Shopify SEO Tip (International)

If you’re targeting global traffic (USA, UK, etc), make sure:

  • Important pages are NOT blocked
  • Blog posts are crawlable
  • Sitemap is accessible

Conclusion

You cannot remove the robots.txt file in Shopify, but you can edit it to control how search engines crawl your website.

By making the right changes, you can fix indexing issues and improve your SEO performance.

Need Help with Shopify SEO or Development?

I help businesses build high-converting Shopify stores and fix performance issues.

Hire Shopify Developer