Robots.txt Tester

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free robots.txt tester. Paste your robots.txt and a URL to see if Googlebot, Bingbot or AI crawlers may fetch it, and exactly which rule decides.

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the robots.txt tester

  1. Paste your robots.txt. Open yoursite.com/robots.txt in a browser and copy everything, or paste a draft you're working on.
  2. Enter the URL or path to test, such as /checkout/cart or https://example.com/blog/post?sort=new.
  3. Choose a crawler: Googlebot, Googlebot-Image, Googlebot-News, Bingbot, GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, CCBot, or type another crawler's name.

The robots.txt tester shows whether the URL is allowed or blocked for that crawler, the exact rule and line number that decided it, and which user-agent group was used. It also flags lines crawlers will ignore and a missing Sitemap line.

How robots.txt works

A robots.txt file sits at the root of a site and tells crawlers which URLs they may fetch. It's organised in groups:

User-agent: *
Disallow: /checkout/
Disallow: /account/
Allow: /account/login

User-agent: GPTBot
Disallow: /

Sitemap: https://example.com/sitemap.xml

Each group starts with one or more User-agent lines naming the crawlers it applies to, followed by Allow and Disallow rules. A Sitemap line can go anywhere.

How the robots.txt tester decides

It follows the robots.txt standard (RFC 9309) and Google's documented behaviour:

1. Pick the group. A crawler uses the group whose User-agent matches its name most specifically. Matching ignores case. If several groups name the same crawler, their rules are combined. If no group names it, it uses the * group. If there's no * group either, everything is allowed.

Some Google crawlers fall back to Googlebot's rules: Googlebot-Image, Googlebot-News and Googlebot-Video follow a "User-agent: Googlebot" group when there's no group for them specifically. The robots.txt tester follows the same chain.

2. Find the matching rules. A rule matches if the URL path (including any query string) starts with the rule's path. Two wildcards are supported:

  • * matches any sequence of characters: Disallow: /*?sort= blocks any URL with "?sort=".
  • $ marks the end of the URL: Disallow: /*.pdf$ blocks URLs ending in .pdf, but not /file.pdf?download=1.

3. The longest match wins. If several rules match, the one with the longest path is used, because it's the most specific. With Disallow: /account/ and Allow: /account/login, the URL /account/login matches both, and the Allow rule is longer, so it's allowed.

4. Allow wins a tie. If an Allow and a Disallow rule are the same length, the URL is allowed.

5. No match means allowed. And /robots.txt itself is always allowed.

An empty Disallow: line means nothing is disallowed.

What robots.txt can and can't do

It controls crawling, not indexing. A page blocked by robots.txt can still appear in search results if other sites link to it, usually without a description. To keep a page out of results, let it be crawled and add a noindex tag instead. The meta robots tag generator creates one.

It's a request, not security. Well-behaved crawlers follow it; others may not. Never rely on robots.txt to hide private pages. Use passwords and proper access control.

It's public. Anyone can read your robots.txt, so it shouldn't list secret URLs.

Blocking AI crawlers

Many site owners now decide which AI crawlers may use their content:

  • GPTBot collects training data for OpenAI models; OAI-SearchBot is used for ChatGPT search results.
  • ClaudeBot is Anthropic's crawler.
  • PerplexityBot powers Perplexity's answers.
  • CCBot builds Common Crawl, a dataset used by many AI projects.
  • Google-Extended is a control token for Google's AI models; it's not a separate crawler and doesn't affect Google Search.

Blocking training crawlers while allowing search crawlers is a common choice. The robots.txt generator builds these rules, and the llms.txt generator creates a guide file for AI tools.

Common robots.txt mistakes

  • Blocking the whole site by accident with Disallow: / left over from a staging site. It's one of the most damaging SEO mistakes, and easy to catch with the robots.txt tester.
  • Blocking CSS and JavaScript, which stops search engines from rendering pages properly.
  • Forgetting the trailing slash: Disallow: /blog also blocks /blog-tips and /blogger. Use /blog/ for just the folder.
  • Case mismatches: paths are case-sensitive. /Admin/ doesn't block /admin/.
  • Rules before any User-agent line, which apply to no one. The tester warns about these.
  • Unsupported fields: Google ignores Noindex: and Crawl-delay: in robots.txt. The tester notes lines Google doesn't follow.

Testing before you publish

Always test changes before uploading a new robots.txt:

  1. Paste the new version into the robots.txt tester.
  2. Test your most important pages: home page, categories, top products, blog posts. They should all be allowed for Googlebot.
  3. Test the pages you mean to block.
  4. Upload it, then check it again on the live site.

Tips

  • Keep it short and simple. Fewer rules mean fewer surprises.
  • Add your sitemap with a full URL: Sitemap: https://example.com/sitemap.xml. The XML sitemap generator makes one.
  • One file per host: blog.example.com needs its own robots.txt.
  • Test parameters: filter and sort parameters are a common reason to use *.

Privacy and accuracy

Your robots.txt and URLs stay in your browser. Nothing is fetched or uploaded. The robots.txt tester applies the RFC 9309 matching rules and Google's documented group selection and precedence exactly, with no AI involved, so the same file and URL always give the same answer. SEO specialists, developers and site owners use it free on any device.

Crawl budget

Large sites with many URLs (online shops with filters, sites with search pages or calendars) can produce thousands of near-duplicate URLs. Search engines only crawl so many pages on each visit. Blocking low-value URLs, such as internal search results, endless filter combinations and session parameters, helps crawlers spend their time on pages that matter. Test each pattern in the robots.txt tester so you don't block product or category pages by mistake.

Robots.txt during a site launch or migration

Development and staging sites are often blocked with "Disallow: /" to keep them out of search engines. The danger comes when the site goes live and the file is copied across unchanged, blocking the whole live site. Make "test robots.txt" part of every launch checklist: paste the live file into the robots.txt tester and check the home page and a few key pages with Googlebot.

Where robots.txt must live

It must be at the root of the host: https://example.com/robots.txt. A file at https://example.com/folder/robots.txt is ignored. Each protocol and subdomain counts separately, so http and https versions, and www and non-www, can each have their own file.

Quick reference

  • User-agent: the crawler a group applies to.
  • Disallow / Allow: paths a crawler may not or may fetch.
  • Wildcard (*): any characters. $: end of URL.
  • Longest match: the most specific rule wins.

These four ideas explain every result the robots.txt tester gives.

Robots.txt and new content

Remember that crawlers only discover pages they can reach. If you launch a new section of your site, check it isn't covered by an old Disallow rule, and add it to your sitemap. A quick test in the robots.txt tester before launch saves weeks of wondering why pages aren't indexed.

Keep a copy of every version

Before editing robots.txt, save a copy of the current file. If something goes wrong after an update, you can restore it in minutes.

A worked example

An online shop's robots.txt has a * group that disallows /checkout/ and /account/, allows /account/login, disallows any URL with ?sort= and any URL ending in .pdf, and a separate group that blocks GPTBot from everything.

The SEO manager tests a few URLs with Googlebot:

  • /account/login: ✓ Allowed, by line 4 (Allow: /account/login), the longest match.
  • /account/orders: ✕ Blocked, by line 3 (Disallow: /account/).
  • /shoes/?sort=price: ✕ Blocked, by line 5.
  • /catalogue.pdf: ✕ Blocked, by line 6; but /catalogue.pdf?v=2 is allowed, because $ requires the URL to end in .pdf.

Then she tests /shoes/ with GPTBot: ✕ Blocked by line 9 (Disallow: /), as intended. Everything works as planned, so she publishes.

Search ads for the searches that matter now

Good markup helps your pages rank over time. Google Ads puts the same pages in front of buyers today. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.

Frequently asked questions

How do I test my robots.txt?

Paste it into the robots.txt tester, enter a URL and pick a crawler. It shows whether the URL is allowed and which rule decided.

What happens when Allow and Disallow both match?

The rule with the longer path wins. If they're the same length, Allow wins.

Does robots.txt stop a page being indexed?

No. It stops crawling. Use a noindex tag to keep a page out of search results.

What do * and $ mean in robots.txt?

* matches any characters; $ means the URL must end there.

Can I block AI crawlers with robots.txt?

Yes, by naming them, such as User-agent: GPTBot followed by Disallow: /. Reputable AI crawlers follow it.

Is the robots.txt tester free?

Yes, completely free, with no sign-up.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep