Skip to content

Cloudflare Worker

Every request, before every cache

The worker runs at Cloudflare's edge, ahead of your cache and your origin, so it sees every request that reaches your domain. It reports the AI crawlers among them and writes your schema.org markup into the HTML on the way out. One script, one deploy, and it does not care what runs behind it.

You need a Cloudflare zone for the domain. Everything else is on this page.

The only channel that sees everything

A plugin runs inside your application, so a full-page cache answers before it ever loads. A worker runs in front of the cache. That difference is the whole reason this option exists, and it is why the crawler counts from here are totals rather than floors.

Ahead of every cache

Cloudflare runs the worker on each request that reaches your domain, cached or not. Nothing downstream can hide a crawler visit from it, so the numbers do not need a footnote.

Injects, never generates

Baseline generates and stores your schema; the worker fetches it per URL and writes it into the head. No schema logic runs at your edge, so there is nothing there to go stale.

Never cloaks

Every visitor gets byte-identical output, human or bot. The worker reads the user agent to decide what to report to us and nothing else. An automated test drives it with both and diffs the two responses.

Fails open

If Baseline is unreachable, or has nothing for a page, the worker emits nothing and the response passes through untouched. A delivery integration must never be able to break a site.

Any stack behind it

WordPress, Next.js, Rails, Django, a static bucket. The worker sits in front, so what you run at origin is not its business and you change nothing there.

Reporting is free

Bot reporting costs nothing and needs no plan. The same script starts injecting schema the moment you have a plan for the domain, with no second deploy and no re-paste.

Deploy it, step by step

Four steps. Your script arrives pre-filled with your domain, your ingest token and your ownership tag, so there is nothing in it to edit.

  1. Name the site you are connecting
    We do not guess this. Registering the site named above is what mints the ingest token your worker presents on every batch, and it is what your ownership tag is derived from.
    Checking your account…
  2. Get your worker script
    One file, no dependencies, nothing to configure. Register the domain above and it appears here.
    Waiting for a registered domain.
  3. Deploy it, then give it a route
    In the Cloudflare dashboard, open Workers & Pages, click Create, start from the Hello World template, replace the editor contents with the script, and Deploy.

    A deployed worker runs on nothing until you point traffic at it. Open the worker's Settings → Domains & Routes, add a route, and use the pattern below. It has to end in /* or your homepage is not covered, which is exactly the page we read when we verify.

    yourdomain.com/*

    Pick the zone that actually serves the domain. If Cloudflare has been caching the site, purge the cache afterwards, or you will be reading a copy that predates the worker.

    Or from the command line
    # Save the script from step 2 as worker.js first.
    npx wrangler init baseline-connector --yes
    npx wrangler deploy worker.js --name baseline-connector \
        --route "yourdomain.com/*"
  4. Check it from our side
    Cloudflare will tell you the worker deployed. This tells you whether it is actually running on your traffic, which is a different question and the one that counts. It answers for the site named at the top of this walkthrough.
Confirm it landed yourself. Fetch any page on the domain and search the source for baseline-channel. If that meta tag is in the raw HTML, the worker is running and crawlers can see everything it emits.

Three things worth knowing before you deploy

We cannot update a deployed worker
Once it is in your account it is yours, and we have no way to push a new version to it. A worker deployed before crawler reporting existed verifies perfectly and reports nothing, forever, which looks identical to "no AI crawlers came". Your install page flags that specific case and asks you to re-paste. It is the only fix there is.
It will not bypass your cache for bots
Serving crawlers freshly rendered HTML while people get a cached copy is cloaking, and it is against search-engine guidelines. It is also the obvious trick, which is why we are saying plainly that we refuse it. The worker sits ahead of the cache instead, which gets the same result honestly.
These steps are newer than the plugin's
The WordPress walkthrough has been through real installs with screenshots of every screen. This one has not been walked end to end against a live zone yet, and Cloudflare moves its dashboard labels around. If a step does not match what you are looking at, tell us which one and it goes to the front of the queue.

What you need

Cloudflare A zone for the domain, on any plan including the free one. Workers are included.
Account A free Baseline Labs account. Sign up - no card.
Bot reporting Free, on every plan, with no domain limit beyond the ones you have registered.
Schema injection Needs a plan with a spare domain slot. The worker is the same either way - it simply injects nothing until there is schema for the page. See pricing.
Route A route pattern ending in /*, on the zone that serves the domain.

There are two other ways in

Three channels deliver the same schema and report the same crawler traffic. Pick whichever matches your stack - they also run together happily.

WordPress plugin
Upload a zip, paste a key, done. Partial crawler coverage on a cached site, because a full-page cache answers before PHP loads. Open the walkthrough.
Custom stack
A dependency-free ES module for Node, Deno, Bun or any edge runtime. Drop it in and call it once per request, or let your coding agent wire it in. Open the walkthrough.
What is connected now
Your install page lists every domain on your account and what is actually live on each - measured, not declared. Open the install page.

Put the whole picture at the edge

One worker, complete crawler counts, and your schema in the HTML that AI systems actually read.

George
Online
0%