robots.txt Optimization
5.1 robots.txt Basics
robots.txt is a plain-text file placed at your website’s root (yourdomain.com/robots.txt) that tells crawlers which pages they may or may not access.
All well-behaved crawlers — including AI agent crawlers — read this file before crawling your site.
5.2 Traditional Crawlers vs AI Crawlers
Between 2024 and 2026, a large number of new AI crawlers have emerged. They use different User-Agent strings from traditional search engine crawlers:5.3 Recommended Configuration
For e-commerce sites that want to maximize AI visibility:5.4 AI Training vs AI Browsing: An Important Distinction
Recommendation: AI browsing crawlers must be allowed (otherwise AI agents cannot see your pages when recommending you). AI training crawlers depend on your preference, but allowing training generally means AI has a better understanding of your brand and products.
5.5 robots.txt Management by Platform
Shopify
Shopify controls robots.txt through the theme filerobots.txt.liquid:
- Online Store → Themes → Edit code
- Find
robots.txt.liquid - Add the AI crawler rules you need
WordPress / WooCommerce
WordPress auto-generatesrobots.txt. Customize via:
- Yoast SEO: SEO → Tools → File editor
- RankMath: General Settings → Edit .htaccess and robots.txt
- Manual: Create a physical
robots.txtfile in the WordPress root directory (overrides the auto-generated version)
Self-Hosted Sites
Simply create or edit therobots.txt file in your website’s root directory.
5.6 Common Mistakes
5.7 Verification
- Visit
yourdomain.com/robots.txtand confirm the file exists with correct formatting - Use Google Robots Testing Tool to validate rules
- Confirm that AI crawler User-Agents do not appear under any
Disallowrules
Next chapter: Writing llms.txt — Your company brief for AI agents