Our robots.txt editor: one toggle per bot, analysis of the real file, and publishing via Cloudflare

By Martín Garay

An editable robots.txt file is compared with an inspection of the file served by a store.

Editing robots.txt depends on the platform's capabilities and the layers serving the domain. If you use Cloudflare, managed content may be prepended to the origin file, not necessarily replace it entirely. Check the current configuration and combined file before designing another one.

That's the starting point for the IndexNow Connect robots.txt editor. It doesn't assume you write the file. It assumes someone else writes it for you, and works from there.

What the screen does is concrete: it reads your real file, tells you who appears to be writing it, lets you design a new one with one toggle per bot, and — if you want — publishes it through a Cloudflare Worker that you paste into your own account.

First it reads the file that's live right now

Every time you open the screen, a live request goes out to https://yourdomain/robots.txt. With a 6-second timeout, a 500 KB cap, and an anti-SSRF guard. A 4xx is read as "there's no file"; a 5xx stays unknown, because a server error is not the same as "everything allowed".

The analysis runs over that text. It gives you back:

  • Who appears to be writing it. Eight pattern signatures: Cloudflare, Tiendanube, Shopify, WordPress, Wix, VTEX, PrestaShop, Magento. It's a text heuristic over the whole file, not a platform-ownership detection. A sitemap hosted on cdn.shopify.com is enough to flag Shopify. That's why the screen says "who appears to be writing it" and, when nothing matches, "we couldn't identify it".
  • A verdict per bot. For the 45 bots in the catalog that have a token, it evaluates whether they can reach the root /. The question the editor answers is "does this bot get in or not?", not the verdict for a specific URL.
  • Diagnostic notes. Eight possible ones: Cloudflare block present, all bots blocked, AdsBot-Google unnamed while disallowed paths exist, tokens nobody recognizes (possible typo), duplicate tokens, no Sitemap:, Crawl-delay present, and one specific note: you declared ai-train=no but there are AI bots left unblocked.

That last note exists because the intuitive reading is the wrong one. Content-Signal declares permitted use, it does not block access. If you want the detail on that line — what each signal means, who honors it and who doesn't — it's in content-signals-robots-txt.

Exclusive content

For signed-in readers

A pre-edit checklist for robots.txt

Gather the current version, owners, rules to preserve, and acceptance tests before preparing a change.

Sign in to access this section →

We work to offer the best possible content, which is why some of these explanations are not public.

One toggle per bot, and the blocked ones are what we store

The grid has 45 toggles across four groups: AI (21), search engines (10), SEO (6) and social (8). Each one switched on means "this bot gets in".

When you switch one off, the generated file doesn't add a line to the * group. It creates that bot its own group:

User-agent: GPTBot
Disallow: /

A specific group changes which rules apply to that bot; do not assume it inherits the wildcard group's rules. Compare specific paths before approving the result. The REP protocol explains group selection and does not constitute access authorization.

Now, the persistence decision. In the database we store the blocked ones, not the allowed ones.

The reason is the default. When we add a new bot to the catalog tomorrow, with "blocked" that bot starts out allowed — which is what you expect — whereas with "allowed" it would end up disallowed without anyone deciding it. A change we make to the catalog can't block traffic you never asked to block. There's a dedicated test for that.

The on-screen editor works with the set of allowed bots, because that's what each toggle marks. The conversion between the two models lives at the edge, between the screen and the database.

What else goes into the generated file

Beyond the toggles, the editor handles:

  • The three Content-Signal signals (search, ai-input, ai-train) plus Cloudflare's experimental use. If you declare none, the block isn't written: with no signals the file stays clean.
  • Disallowed paths for the * group, one per line.
  • The Sitemap: lines, which go at the end.
  • An AdsBot checkbox. If it's on and there are disallowed paths, a User-agent: AdsBot-Google group is generated with the same paths repeated. Google's AdsBot does not obey the * group: if you don't name it, it keeps coming in. It's the same solution Tiendanube uses.

What the generator loses (and it's worth saying out loud)

The generated file does not preserve everything the original had. Four things survive: the * group's signals, the * group's Disallow paths, full per-bot blocks, and the Sitemap: lines.

What's lost:

  • Specific Allow: rules. A fixed Allow: / is always written.
  • Crawl-delay lines. (Googlebot ignores them anyway; Bing and Yandex honor them.)
  • Any per-bot group with partial rules. A Googlebot-Image: Disallow: /photos/ becomes either "fully blocked" or nothing.

There's also a real bug worth naming. The generator writes the bot's name, not its token. For 44 of the 45 they match once lowercased. The exception is Screaming Frog: the catalog declares the token screaming frog seo spider, but the file comes out with User-agent: Screaming Frog. Switching that toggle off doesn't produce a rule the crawler recognizes as its own. We verified it by generating a file with every bot blocked and analyzing it again: it's the only one that comes back as not blocked.

We don't validate the syntax of what you write, either. Paths aren't checked for starting with /, sitemaps aren't checked for being valid URLs or for pointing at your domain. Any non-empty line goes in as-is. That's why the screen warns you, right above the button: a badly built robots.txt can take your site out of the search engines.

Exclusive content

For signed-in readers

Find rules lost during regeneration

Compare two fictional files and work through three cases that show why counting lines is not enough to validate the result.

Sign in to access this section →

We work to offer the best possible content, which is why some of these explanations are not public.

Publishing doesn't touch your domain

Here's the most important limitation, and the one people forget most.

"Save and publish" does two things: it saves the configuration and it flips a flag. With that flag on, /robotsfile/yourdomain starts returning the file. Your domain keeps serving exactly what it always served.

The file goes live only once the Cloudflare Worker has the route. The Worker is a snippet you paste into your own Cloudflare account — there's no integration with the Cloudflare API, you set up the route by hand — and it intercepts exactly two URLs: the IndexNow key (/{hex}.txt) and /robots.txt. Anything else passes straight through.

The described fallback aims to use the origin when the API does not return the file. That intent alone does not guarantee continuity: errors, timeouts, routes, and origin availability must be tested. Keep the previous response and a verifiable recovery method.

Why a Worker is needed: it's the only mechanism we have to answer a URL at the root of someone else's domain. The platform doesn't allow uploading files and the protocol requires the same host. There's no shortcut through another domain. It's exactly the same problem we solve for the IndexNow key with Cloudflare Workers, and the Cloudflare technical guide for SEO and GEO covers the rest of the pieces.

Exclusive content

For signed-in readers

Test saving, publication, and the domain response

Use identified versions so a new draft is not mistaken for a failed publication.

Sign in to access this section →

We work to offer the best possible content, which is why some of these explanations are not public.

Three states, not two

The screen distinguishes three situations that people confuse and that have different fixes:

  1. Not published. Nothing is saved with the flag on.
  2. Published, but your domain still serves something else. The classic mistake: the route is missing from the Worker.
  3. Live. The real file matches the generated one.

The third state isn't declared just because a button was pressed. It's verified: the real file's text is compared against the generated one, in full, exact except for leading and trailing whitespace. If they don't match, we don't say it's published.

Two honest caveats about that check. First: the comparison is boolean, there's no visual diff. Second: the "generated" file it compares against is the draft you have on screen. If you flip toggles and hit Generate without publishing, the card may say "your domain serves something else" even though the published version really is live.

And the underlying limitation: the check only happens when someone opens the screen. There's no scheduled verification and no alerts. Nothing re-verifies later if the Worker stops serving it. There's no history or versioning either: we store the last configuration, the publication date and the update date.

The described design regenerates the file from the configuration and uses Cache-Control: no-store. Unpublishing changes that application's response, but does not prove an instant update across all layers or crawler copies. Check the domain after every change and keep the previous configuration.

If on top of deciding who gets in you want to measure what happens when they do, IndexNow Connect, the CookingMetrics tool, connects your store, notifies the search engines every time you change a product, and shows you whether AI bots are actually arriving. The robots.txt editor is one piece of that, not the whole product.

Exclusive content

For signed-in readers

Prepare a recovery you can verify

Follow a guide to preserve the failure, locate the responsible layer, and verify restoration without promising instant effects.

Sign in to access this section →

We work to offer the best possible content, which is why some of these explanations are not public.

Frequently asked questions

Can I use the editor without Cloudflare?

You can design the file, analyze it and download it. You can't publish it on your domain. On Tiendanube the file is served by the platform, and the Cloudflare Worker is the only way we have to answer a URL at the root of your domain. If your site runs on a platform where you can upload the file yourself, download it and upload it.

If I block an AI bot, does it stop using my content?

It stops coming in, if it honors the REP. Disallow is a preference, not a technical barrier: a crawler can ignore it. Real blocking takes WAF or Bot Management rules, which is what Cloudflare's own docs recommend. And don't confuse blocking with Content-Signal: the signal declares permitted use, it doesn't prevent access.

Why does the generated file lose my current rules?

Because the generator builds the file from the editor's configuration, it doesn't patch it. It keeps * group signals, * group Disallow paths, full per-bot blocks and the Sitemap: lines. Everything else — specific Allow: rules, Crawl-delay, groups with partial rules — doesn't survive. Before publishing, look at the generated file on screen and compare it with the raw one we show you above.

What happens if your server goes down?

The fallback is intended to use the origin, but the result depends on error handling, the route, and the origin's availability. It must be checked in the specific installation; describing a fallback alone does not guarantee there will be no impact.

How do I know whether the bots are actually getting in?

The editor describes the rules it interprets. The AI bot accessibility test checks responses with test User-Agents; it does not prove visits from real providers. For those, you need logs and verified identity.

Contents

Want to notify search engines when your catalog changes?

Explore IndexNow Connect