How to test robots.txt in four steps
- Enter a full URL from the site you want to check, including https://.
- Pick a crawler. Googlebot covers Google Search. Bingbot also feeds DuckDuckGo and Yahoo results. GPTBot, ClaudeBot and PerplexityBot are AI crawlers.
- Load the live file to test what is deployed now, or paste a draft to test changes before you ship them.
- Read the verdict and the matched rule. If the result surprises you, change the rule in the text box and test again until it behaves as intended.
Five robots.txt mistakes that block the wrong pages
1. Blocking CSS and JavaScript
Google renders pages like a browser. If /assets/ or /wp-includes/ is disallowed, Googlebot may see a broken layout and judge the page as not mobile-friendly. Test one of your stylesheet or script URLs as Googlebot. It should come back Allowed.
2. A staging rule that reached production
A staging Disallow: / that gets deployed to the live site stops all crawling. After every release, run your homepage through the tester as Googlebot.
User-agent: * Disallow: /
3. Prefix rules that are too short
Rules match from the start of the path. Disallow: /p blocks /p/123, but also /pricing and /products. End directory rules with a slash, and use $ when you mean one exact URL.
4. Using robots.txt to hide pages
A disallowed page can still be indexed from links, and anyone can read your robots.txt. Use noindex for pages that must stay out of search, and authentication for anything private.
5. A crawler group that drops the shared rules
Once you add User-agent: Googlebot, Googlebot stops reading the * group. Copy the shared rules into each named group.
User-agent: * Disallow: /cart/ Disallow: /search # Googlebot ignores the group above, so repeat the rules User-agent: Googlebot Disallow: /cart/ Disallow: /search Allow: /search/help
A safe starting robots.txt
Most sites need only a few lines. Block internal search, cart and account pages, then list your sitemap so crawlers find every URL you want indexed.
User-agent: * Disallow: /cart/ Disallow: /account/ Disallow: /*?sessionid= User-agent: GPTBot Disallow: / Sitemap: https://example.com/sitemap.xml
Need a file from scratch? Build one with the robots.txt generator, then test it here. To see which AI bots can reach your site, run the AI crawler access checker. For a single page, the indexability checker also checks noindex, canonical and status codes, not just robots.txt.
Allowed is not the same as indexed
Passing this test means a crawler may fetch the page. It does not mean the page is in Google or Bing. New and updated pages can wait days or weeks to be crawled. Submitting them through the Google Indexing API and IndexNow speeds that up.