How crawlers read robots.txt
Robots.txt is a plain-text file at the root of a host that tells crawlers which paths they may fetch. This tester applies the same rules Google documents, so the verdict matches what Googlebot will do:
- One group per crawler. A crawler obeys the group whose
User-agentmatches its name. If none matches, it uses the*group. It never combines its own group with*. - The longest matching rule wins.
Allow: /blog/publicbeatsDisallow: /blogfor/blog/public/postbecause it is more specific. - Allow wins a tie. When an allow and a disallow rule are the same length, the page may be crawled.
- Wildcards.
*matches any run of characters and$anchors the end, soDisallow: /*.pdf$blocks every PDF. - Case matters in paths:
/Adminand/adminare different.
Blocking is not the same as noindex
Robots.txt stops crawling, not indexing. A blocked URL can still appear in search results if other sites link to it, just without a description. To keep a page out of Google, let it be crawled and add a noindex tag or X-Robots-Tag header. Check those with the HTTP header checker.
AI crawlers
AI companies publish separate user-agents for training and for live answers. Blocking GPTBot stops OpenAI training on your pages; blocking OAI-SearchBot would also keep you out of ChatGPT search. Google-Extended controls Gemini training without affecting Google Search. Decide per crawler: being cited in AI answers can send real traffic.
Common mistakes
Disallow: /left over from a staging site.- Blocking CSS and JavaScript, which stops Google rendering the page.
- A robots.txt that returns a 5xx error: Google treats that as "block everything".
Write a clean file with the robots.txt generator, and point crawlers at your sitemap with a Sitemap: line.