Insights
Editing the Shopify Robots.Txt File: The How-to Guide
The Shopify robots.txt file enables you to give commands to search engine crawlers such as Google. These instructions will tell them what resources are most relevant to your search. The file will also tell web crawlers when not to crawl certain resources, such as login or admin pages. What’s more, users of Shopify can also change the instructions to get a more accurate and useful result.The Location of Shopify Robots
The robots.txt is found in the root folder of a user’s primary domain. Previously, it wasn’t possible to edit this file. As of June 16, 2021, however, this option is now available to Shopify users. Tobi Lutke, the CEO of Shopify, confirmed this fact by tweeting about it on the aforementioned date.Editing the Shopify Robots.txt File: A Step by Step Guide
If you’re interested in editing your Shopify robots.txt file, here are the steps you’ll need to follow:- Go to the Shopify admin page. From there, select Online Store>Themes
- Click ‘Actions’, then ‘Edit Code’
- Click the ‘Add a new template’ option
- Select ‘robots’
- Click ‘Create template’
- Make any edits or changes on the default template
- Save the changes to robots.txt.liquid file in the published theme
Hiding Shopify Pages
If you want to hide your Shopify pages from Google, simply change the instructions regarding this. You can do this in the following way:- Go to the Shopify admin page. From there, select Online Store>Themes
- Find and select the theme you need to edit
- Click ‘Actions’, and then, click ‘Edit Code’
- Select the theme.liquid layout file
Hiding the Shopify Search Template
At some point, you might also want to hide the Shopify search template from search engines like Google. Follow the steps below to accomplish this:- Go to the Shopify admin page. From there, select Online Store>Themes
- Find and select whatever theme you need to edit.
- Click ‘Actions’, then click ‘Edit code’
- Select the theme.liquid layout file
- Paste the code below within the section
Hiding a Particular Shopify Page from Search Engines
If you’re looking to hide one specific page on Shopify from Google web crawlers, here’s how to go about it:- Go to the Shopify admin page. From there, select Online Store>Themes
- Select the theme for editing
- Click ‘Actions’, then click ‘Edit code’
- Select the theme.liquid layout file
- Paste the code below within thesection:
- Ensure that you replace the words ‘page-handle-you-want-to-exclude’ with the right page handle that you want to hide
- Click ‘Save’
About Page Handles
The page handle in Shopify is the URL slug, which is the net of the domain. It’s basically the title of the object in lowercase letters. If there are any spaces in the titles, these are represented by hyphens. The same goes for any special characters such as a comma, semicolon, etc. The Shopify Developers page has more information about Object Handle documentation. So, you can also go there for further clarification.Hiding Multiple Pages from Search Engines
When you want several pages to stay hidden from search engine web crawlers, especially Google’s, here’s what you need to do:- Go to the Shopify admin page. From there, select Online Store>Themes
- Select the theme for editing
- Click ‘Actions’, then click ‘Edit code’
- Select the theme.liquid layout file
- Paste the code below within the section:
- Replace ‘page-handle-you-want-to-exclude’ with the relevant page handles
- Save the changes
Hiding Dynamic Shopify Pages from Search Engines
If your aim is to hide dynamic Shopify pages from search engines, try these steps:- Go to the Shopify admin page. From there, select Online Store>Themes
- Select the theme for editing
- Click ‘Actions’, then click ‘Edit code’
- Select the theme.liquid layout file
- Paste the code below within thesection:
- Replace ‘your-text’ with the relevant keywords that you need to hide
- Save the changes
Protection from Web Crawlers: Hiding Shopify Pages
You should carry out the following steps for hiding Shopify pages from the web crawlers like Googlebot:- Go to the Shopify admin page. From there, select Online Store>Themes
- Select the theme for editing
- Click ‘Actions’, then click ‘Edit code’
- Select the theme.liquid layout file
- Paste the code below within thesection:
- Remove ‘current_tags’ and use that space to put in the right tag for the pages that need hiding.
- Save your changes
Up Next
We are digital marketing experts