What robots.txt does
Robots.txt tells compliant crawlers which paths they may request. It is public, simple, and easy to misunderstand. It does not remove already indexed pages by itself, it does not protect private content, and it does not guarantee every crawler will comply.
For AI crawlers, robots.txt is part of crawler governance. It helps you express which public content can be fetched by which bots, but it should be paired with access controls for anything sensitive.
Start with intent
Before writing rules, decide what you want. An editorial publication may want search engines and selected AI crawlers to access articles, category pages, pillar guides, and policy pages. The same site may want to block admin paths, internal search results, preview routes, and parameter combinations.
Blanket rules feel decisive but often hide tradeoffs. Blocking all AI crawlers may reduce unwanted scraping, but it can also reduce discovery and citation opportunities. Allowing every crawler may improve exposure but increase load or licensing concerns.
Avoid common mistakes
Do not block public content accidentally. A broad rule such as Disallow: /blog can remove your entire article library from crawl paths. Do not block JavaScript or CSS files needed to render important pages. Do not include private URLs in robots.txt because the file itself is public and can reveal paths.
Remember that robots.txt works by path pattern. Test rules before deploying them, especially when using wildcards.
A simple editorial example
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /account/
Disallow: /search
Disallow: /*?*
Sitemap: https://webtrafficagents.com/sitemap.xml
That example keeps public canonical content open while reducing crawl waste. A larger site might add bot-specific groups for GPTBot, ClaudeBot, PerplexityBot, or other crawlers based on policy decisions.
Audit after every change
After changing robots.txt, fetch it directly, test important URLs, and watch logs. Confirm Googlebot, Bingbot, and selected AI crawlers can still access the pages you want discovered. Check Search Console for blocked resources or indexing changes.
Bot-specific rules
Some sites use bot-specific groups for AI crawlers. That can be reasonable, but it should be documented. For example, you might allow traditional search crawlers, allow selected AI answer crawlers, and block crawlers associated with training uses you do not want. You might also block aggressive crawlers that create load without returning value.
Keep in mind that crawler names and policies change. Review official documentation before making high-stakes decisions, and revisit rules at least quarterly. If a bot has separate agents for search, user-triggered browsing, and training, understand which directive affects which behavior.
Avoid using robots.txt as a private policy memo. The file is visible to everyone. Keep explanations in internal documentation and publish only the directives required for crawlers.
Testing robots.txt changes
Testing should include both positive and negative cases. Pick URLs that should be allowed and URLs that should be blocked, then verify the rule outcome before deployment. After deployment, fetch robots.txt directly from production, submit important URLs in Search Console when relevant, and watch server logs for unexpected 403, 404, or crawl drops.
If organic visibility changes after a robots update, compare the timeline against rule changes. Robots mistakes can look like algorithm changes from a distance. A small, version-controlled file can have site-wide consequences.
Robots.txt and index control
Robots.txt is often confused with index control. Blocking a URL can prevent crawlers from fetching the page, but it does not always remove a known URL from search results. If a page must stay out of the index, use a noindex directive on a crawlable page or remove access entirely when appropriate. If the content is private, use authentication rather than robots rules.
This distinction matters for AI crawlers too. A blocked page may still be known from links, but compliant crawlers should not fetch it. Decide whether your goal is to reduce crawling, prevent indexing, protect sensitive content, or opt out of a particular use. Each goal requires a different control.
If you want a page removed from search, pair the right directive with the right access pattern. A noindex tag must be seen by the crawler, so blocking the same URL in robots.txt can prevent the crawler from seeing the noindex instruction. For sensitive content, neither approach is enough. Put sensitive pages behind authentication and avoid linking them from public pages.
Documentation for teams
Keep a short internal note beside the robots file. List each major rule, the reason it exists, the date it changed, and the person who approved it. That note can be more important than the file itself when a future teammate wonders why a crawler was blocked.
Robots.txt should be version-controlled and reviewed like code. The file is small, but one line can change what search engines and AI systems can see.
Practical examples
- Allow public articles and pillar pages while disallowing admin, account, checkout, and internal search routes.
- Add a sitemap line so crawlers can discover canonical URLs.
- Document why each AI bot is allowed or blocked so future changes are deliberate.
FAQ
Common questions
Does robots.txt legally block AI crawlers?
Robots.txt is a crawler directive followed by compliant bots, not an access control system. Sensitive content should require authentication.
Should I block Google-Extended?
That depends on whether you want to opt out of certain Google AI training uses while keeping Google Search crawling separate. Review current Google documentation before deciding.
Can robots.txt hurt SEO?
Yes. Accidental disallow rules can block important pages or assets and make crawlers see less content.
Newsletter
Practical traffic intelligence in your inbox.
One email per week with a useful guide on search, AI discovery, analytics, or conversion. No tracking pixels in the body. Unsubscribe anytime.
We send one email per week. Your address is never sold.