robots.txt generator and URL tester

Build your robots.txt by ticking what you want to block, AI crawlers included, then check whether a URL is allowed for Googlebot, GPTBot or any other robot, with the exact line that decides.

Generate a robots.txt

Access for all robots

One path per line, starting with “/”. “*” stands for any sequence of characters, “$” marks the end of the URL.

To reopen part of a blocked folder: the longest rule wins.

AI crawlers to block across the site

Googlebot and Applebot are not listed here: they also power Google Search and Siri, Spotlight and Safari.

Optional. One full URL per line.

    Test a URL

    robots.txt to use

    How to use the tool

    The generator fills in as you choose. Say whether the whole site stays open, add the folders or URLs to close, tick the AI crawlers you do not want and give your sitemap URL. The file is built below, with warnings when a choice may cost you visibility: a fully blocked site, a badly written path, AI search crawlers excluded. Copy or download it, then upload it to the root of your site.

    The tester answers one specific question: is this robot allowed to crawl this URL? Paste a full URL so it reads the site’s robots.txt, or choose to test the file you just generated or pasted. It shows the verdict, the group of rules used, the deciding line and the lines Google ignores, with the numbered file below. A file read online is also copied into the text box: choose “The file below” to edit it and run the test again before publishing a change.

    What a robots.txt file is for

    A robots.txt file tells crawlers which URLs they can access on your site. Its main purpose is to avoid overloading the site with requests.1 It also keeps pages of no search value out of the crawl: internal search results, carts, endless filtered listings.

    It is not a way to keep a page out of Google. A blocked URL can still be indexed if other pages link to it; it then appears without a description. To remove a page from the results, Google recommends a noindex rule, password protection or deleting the page. And for noindex to work, the page must not be blocked in robots.txt, otherwise the crawler never sees the rule.2

    The file remains a request: Googlebot and reputable crawlers follow it, others may ignore it. Anything that must stay private needs server-side protection.

    Where to put the file and how to write it

    The basic rules come from Google’s documentation on creating a robots.txt file:3

    The file is made of groups. Each group starts with one or more User-agent lines naming the robots concerned, followed by Disallow and Allow rules. Paths start with “/” and are case-sensitive: /Admin/ and /admin/ are two different paths. Sitemap lines can go anywhere and give the full URL of a sitemap, which helps robots find your pages, as explained in our piece on what Google says about XML sitemaps.

    User-agent: *
    Disallow: /cart/
    Disallow: /*?sort=
    Allow: /cart/help/
    
    User-agent: GPTBot
    User-agent: CCBot
    Disallow: /
    
    Sitemap: https://www.example.com/sitemap.xml

    In this example, every robot can crawl the site except the cart, whose help page stays open, and sorted listings. GPTBot and CCBot, gathered in one group, are kept out of the whole site.

    How a robot picks the rule that applies

    This is the part the tool works out for you, following Google’s specification:4

    What Google ignores

    Google only supports four fields: user-agent, allow, disallow and sitemap. Crawl-delay, though widespread, is not supported;4 other robots, such as ClaudeBot according to Anthropic, do follow it.5 Google also ignores malformed lines and rules placed before the first User-agent line; the tester lists them so you can fix them. Finally, Google generally caches the file for 24 hours: a change does not take effect instantly.4

    When the file cannot be read, everything depends on the server response. A 4xx error, 404 first among them, means to Google that there is no file: no restrictions. A 5xx error makes it pause crawling the site and retry. Beyond five redirects, the file is treated as missing.4

    Blocking AI crawlers

    AI companies each publish their crawlers, and most of them separate several by purpose. OpenAI separates GPTBot, which collects content to train its models, from OAI-SearchBot, which surfaces sites in ChatGPT search; the two settings are independent.6 Blocking GPTBot therefore does not stop you being cited in ChatGPT, whereas blocking OAI-SearchBot removes the site from its search answers.

    At Google, Google-Extended controls whether content is used to train Gemini and ground its answers; it has no effect on Google Search. AI Overviews and AI Mode depend on Googlebot, like the rest of Search.7 The generator therefore sorts AI crawlers into three families: training, search and answers, visits on user request. The latter act when a user asks the AI to look at a page, and several companies, including OpenAI and Perplexity, say they may not apply robots.txt in that case.6, 8 This choice has a direct effect on your visibility in generative engines.

    The most common mistakes

    Frequently asked questions

    Where should the robots.txt file go?

    At the root of the site, at https://www.yoursite.com/robots.txt. It only applies to that protocol, host and port: a subdomain needs its own file.3

    Does robots.txt stop a page from appearing in Google?

    No. A blocked page can be indexed if other pages link to it, and show up without a description. To remove it from the results, use a noindex rule on a page left accessible, or protect it with a password.2

    Should I block GPTBot and other AI crawlers?

    It is an editorial choice. Blocking training crawlers, such as GPTBot or Google-Extended, refuses the use of your content to train models, with no effect on Google Search. Blocking search crawlers, such as OAI-SearchBot or PerplexityBot, removes you from those tools’ answers.

    How long before Google sees my new robots.txt?

    Google generally caches the file for 24 hours. The change is therefore picked up within the following day, sometimes later if the server responds poorly.4

    Why does Crawl-delay change nothing for Google?

    Google only supports the user-agent, allow, disallow and sitemap fields. Crawl-delay is ignored by Googlebot, even though other robots follow it.4

    What happens if my site has no robots.txt?

    Nothing serious: if the server answers with a 404 error, Google assumes there are no restrictions and crawls the whole site.4 A robots.txt is only useful if you have something to exclude, or a sitemap to point to.

    Sources

    Passages on this page that rely on a source point to one of these references.

    1. Google Search Central, “Introduction to robots.txt”. developers.google.com ↑
    2. Google Search Central, documentation on noindex and blocking indexing. developers.google.com ↑
    3. Google Search Central, documentation on creating a robots.txt file. developers.google.com ↑
    4. Google Search Central, robots.txt specification. developers.google.com ↑
    5. Anthropic, “Does Anthropic crawl data from the web, and how can site owners block the crawler?”, help center. support.claude.com ↑
    6. OpenAI, documentation on OpenAI’s crawlers (GPTBot, OAI-SearchBot, ChatGPT-User). developers.openai.com ↑
    7. Google, “AI features and your website”, Google Search Central. developers.google.com ↑
    8. Perplexity, documentation on Perplexity’s crawlers (PerplexityBot, Perplexity-User). docs.perplexity.ai ↑

    Want to know what Google actually crawls on your site?

    A full SEO audit cross-checks robots.txt, indexing and crawl logs. I reply within 24 business hours.

    Contact me