Restricting Access to the /apps/giftregistry/ Path on Your Shopify Store
To prevent search engines or other bots from indexing the /apps/giftregistry/ path in your Shopify store, you can modify the robots.txt.liquid file. By doing so, you can ensure that the content under this path remains private or is excluded from search engine crawlers.
Steps to Restrict Access to /apps/giftregistry/
-
Access Your Shopify Admin Panel:
- Log in to your Shopify store admin.
- In the left-hand menu, click on Online Store > Themes.
-
Edit Your Theme’s
robots.txt.liquidFile:- In the Themes section, click on the Actions dropdown button next to the active theme.
- Select Edit code from the dropdown.
- Under the Templates folder, locate and click on the
robots.txt.liquidfile. If you dont see this template, follow the instructions here
-
Add a Disallow Rule for
/apps/giftregistry/:-
In the
robots.txt.liquidfile, add the following line:User-agent: * Disallow: /apps/giftregistry/
- This line tells all search engines (represented by
User-agent: *) not to crawl or index any pages under the/apps/giftregistry/path.
-
-
Save the Changes:
- After adding the rule, click the Save button to apply the changes.
Additional Notes
-
Robots.txt vs Robots Meta Tag: The
robots.txtfile is primarily for search engines and bots to prevent them from crawling and indexing specific parts of your website. However, if you need to prevent indexing at the page level, using therobotsmeta tag inside individual page templates may be more effective. For example:<meta name="robots" content="noindex, nofollow">
-
Shopify Documentation: For further reference on how the
robots.txt.liquidfile works and how you can manage it effectively, please visit the official Shopify Support page on robots.txt.liquid.
Conclusion
By adding the Disallow directive in your robots.txt.liquid file, you can successfully restrict search engines from indexing the /apps/giftregistry/ path on your Shopify store. This ensures that this part of your site remains private and protected from unwanted indexing.