All In One Tools logo
100% Client-Side · Live Regex Rule Tester

Robots.txt Builder & Rule Tester

Create Google-compliant robots.txt files to manage search engine crawler access. Add custom directive groups, specify sitemap paths, and test URLs live to ensure your search engine indexing is properly configured.

Rule Directives

URL Access Tester
Status: Enter a path above to test
Pending

                

How to Create and Test a Robots.txt File

A robots.txt file tells search engine crawlers which parts of your site they may crawl. This tool builds the file from simple rule groups and includes a tester that shows whether a given path would be allowed or blocked, using the same precedence rules Google follows.

Step 01

Choose a user agent

Start with All Crawlers (*). Add more groups only if you need different rules for a specific bot, such as Googlebot or GPTBot.

Step 02

Add Disallow and Allow paths

Enter one path per line. Paths start with / and are case-sensitive. Use * to match any characters and $ to match the end of a URL.

Step 03

Add your sitemap

Enter the full URL of your XML sitemap so crawlers can find it, for example https://example.com/sitemap.xml.

Step 04

Test, then publish

Type a path into the URL Access Tester to check the result. When you are happy, copy or download the file and upload it to the root of your site so it loads at /robots.txt.

Robots.txt Controls Crawling, Not Indexing

This is the most common robots.txt mistake. Blocking a page in robots.txt stops crawlers from reading it, but Google can still list the URL in search results if other pages link to it, just without a description.

To keep a page out of search results, allow it to be crawled and add a noindex robots meta tag or X-Robots-Tag header instead. If you block the page in robots.txt, Google never sees the noindex instruction. For private content, use a password or login; robots.txt is public and anyone can read it.

Which Rule Wins When Allow and Disallow Overlap?

Google follows the robots.txt standard (RFC 9309). A crawler first picks the group whose User-agent line matches it most specifically, falling back to the * group. Within that group, the most specific rule wins, meaning the matching rule with the longest path. If an Allow rule and a Disallow rule are equally specific, Allow wins.

For example, with the rules below, /admin/settings is blocked, but /admin/help/faq is allowed because /admin/help/ is longer and more specific than /admin/. PDF files anywhere on the site are blocked by the wildcard rule.

User-agent: *
Disallow: /admin/
Allow: /admin/help/
Disallow: /*.pdf$

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

Robots.txt Tips and Common Mistakes

  • One file per host. The file must sit at the root of each host, and blog.example.com needs its own file separate from example.com.
  • Do not block CSS and JavaScript. Google renders pages like a browser, so blocking these files can stop it from understanding your layout.
  • Crawl-delay is ignored by Google. Bing and some other crawlers respect it. To slow Googlebot, reduce server errors instead; Google slows down automatically when a site struggles.
  • Watch out for Disallow: /. A single slash blocks your entire site. It is often left behind after a site launch by mistake.
  • AI crawlers. You can block OpenAI's crawler with a GPTBot group. Google uses a separate Google-Extended token to control use of your content for its AI models, which does not affect Google Search.
  • Check it in Search Console. After publishing, the robots.txt report in Google Search Console shows the version Google fetched and any errors it found.

Frequently Asked Questions

Where do I upload robots.txt?

To the root of your domain so it opens at https://yourdomain.com/robots.txt. It will not work in a subfolder.

Does the tester check my live website?

No. It tests the rules you have built on this page, before you publish them. To check the file that is live on your site, use the robots.txt report in Google Search Console.

Can robots.txt remove a page from Google?

No. Use a noindex tag (and leave the page crawlable), or the Removals tool in Search Console for urgent cases.

Do all bots obey robots.txt?

Reputable crawlers like Googlebot and Bingbot do. Malicious bots and scrapers often ignore it, so never rely on robots.txt for security.

Is my robots.txt file sent to your server?

No. The generator and tester run entirely in your browser.