Enforce robots.txt
AI Audit allows you to enforce robots.txt which instructs bots which webpages they can and cannot access.
To enforce robots.txt:
- Log in to the Cloudflare dashboard ↗, and select your account and domain.
 - Go to AI Audit.
 - From the dropdown at the top of the page, select a specific subdomain where you wish you enforce 
robots.txt. - From Summary, select Enforce robots.txt policy.
 - From the Enforce your robots.txt policy page, select Go to WAF custom rules.
 - From the New custom rule page, name your custom rule.
- The page will automatically populate the values for the custom rule.
 
 - From Then take action...:
- For Choose action, select Block.
 - For With response type, select Default Cloudflare WAF block page.
 
 - From Place at:
- For Select order, select Last.
 
 - Select Deploy.
 
This custom rule ensures that bots cannot access the pages specified in your robots.txt file.
For more information, refer to the following resources.
Was this helpful?
- Resources
 - API
 - New to Cloudflare?
 - Products
 - Sponsorships
 - Open Source
 
- Support
 - Help Center
 - System Status
 - Compliance
 - GDPR
 
- Company
 - cloudflare.com
 - Our team
 - Careers
 
- 2025 Cloudflare, Inc.
 - Privacy Policy
 - Terms of Use
 - Report Security Issues
 - Trademark