How to Edit Shopify Robots.txt File, Updated 11th August 2020 – In this article I am going to explain what the robots.txt file is, where in your Shopify store is located and how to hide a page from search engines.
If you want to learn the basics of SEO for Shopify, make sure you check my other articles:
- Optimise Shopify Page Title and Description
- How to Add Shopify Alt Tags to Theme Images
- How to add Alt Tags to Shopify Product Images
- How to Add Google Analytics to Shopify
- How to Add SEO Headings in Shopify
- How to Optimise Your Shopify Site Structure
- How to Find and Submit Your Shopify Sitemap
- How to Verify Your Shopify Store with Google
- How to Create a Redirect in Shopify
- Duplicate Content and Shopify
- Link Building and Shopify
- How to Compress Images on Shopify
- How to Improve Shopify Page Load Speed
- Optimise Your Shopify Blog Posts
- How to Backup Your Shopify Store
- Enable AMP in Shopify
If you need help with ranking your website on Google, feel free to check our Shopify SEO services.
What is the Robots.txt File?
The robots.txt file is where you give instructions to Google and other search engine crawler about what pages to crawl and what not.
For example, it’s typical for a robots.txt file to instruct crawlers not to crawl internal admin or login pages.
Where is the Shopify Robots.txt File Located?
The Shopify robots.txt file is located in the root folder of your primary domain.
How Do I Edit the Shopify Robots.txt File?
You can’t edit your Shopify robots.txt file directly but you can instruct Google spiders about not crawling one or more page:
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, and then click Actions > Edit code.
- Click the
- To exclude the search template, paste the following code in the
- To exclude a specific page, paste the following code in the
Make sure that you replace
page-handle-you-want-to-excludewith the correct page handle.
- Click Save.