How To Edit Robots.txt File in Shopify

Sell Online With Shopify
Trusted by millions of businesses worldwide
Sign up for a free trial and enjoy 3 months of Shopify for $1/month on select plans.

Search engines, such as Google, constantly crawl the internet in search of new data as a source for their search results. The robots.txt file tells search engine bots, known as crawlers, which pages to request to view from your online store. All Shopify stores have a default robots.txt file that’s optimal for Search Engine Optimization (SEO).

Before you can’t adjust anything on this file on Shopify. But starting today, you have complete control over how search engine bots see your store.

The default robots.txt the file works for most stores, but you can edit the file through the robots.txt.liquid theme template. You can make the following edits:

  • Allow or disallow certain URLs from being crawled
  • Add crawl-delay rules for certain crawlers
  • Add extra sitemap URLs
  • Block certain crawlers

How to edit the robots.txt file in Shopify?

You can follow the below steps to edit

  • From your Shopify admin, go to Online Store > Themes.
  • Click Actions, and then click Edit Code.
  • Click Add a new template, and then select robots.
  • Click Create template.
  • Make the changes that you want to make to the default template.
  • Save changes to the robots.txt.liquid file in your published theme.

Changes are instant, but crawlers don’t always react immediately. You can test changes using Google’s robots.txt Tester.

For more information on liquid variables and common use cases, refer to Shopify’s Developer page Customize robots.txt.liquid.

How to delete robots.txt.liquid customizations?

If you want to use the default robots.txt file again, then save a copy of your robots.txt.liquid template customizations as you need to delete the template, which can’t be undone.


  • From your Shopify admin, go to Online Store > Themes.
  • Click Actions, and then click Edit Code.
  • Click robots.liquid, and then click Delete file.
  • If you still want to delete robots.txt.liquid, then click Delete file.

You can always edit the robots.txt.liquid file in the future, or if you saved your past customizations, then you can redo your changes by copying over your saved previous customizations.

Looking for Shopify Experts?

Hura Apps can help you take your store to the next level

Our team of experienced designers and developers can help you create a beautiful, high-converting Shopify store that will drive sales and increase customer satisfaction. From custom design to app development and optimization, we have the skills and expertise to help you achieve your eCommerce goals.

Get in touch

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *