Skip to main content

Edge Worker Setup

The GEO.actor edge worker is a Cloudflare Worker (edge/) that sits in front of your site and handles:

  • Serving managed artifacts: robots.txt, llms.txt, llms-full.txt, and Markdown mirrors
  • Classifying and optionally blocking malicious bots
  • Injecting managed JSON-LD into page <head> — identically for humans and bots
  • Pre-rendering JS-dependent pages for crawlers that cannot execute JavaScript
  • Sending compact bot analytics events to the platform ingest endpoint

The edge worker is available on Pro and Agency plans.

No-cloaking invariant

The edge worker follows a strict no-cloaking policy (GUARDRAILS G8): JSON-LD injection, robots.txt serving, and all managed artifacts are served identically to human users and AI crawlers. No content is served to crawlers that is not also available to human users.

Prerequisites

  • A Cloudflare account with Workers enabled
  • Your site's hostname pointed to Cloudflare (proxied, orange-cloud)
  • A GEO.actor account on Pro or Agency plan
  • Wrangler CLI: npm install -g wrangler

Step 1 — Deploy the worker script

cd edge/
wrangler deploy

This deploys the worker script. No traffic is affected until you attach a route in Step 3.

Step 2 — Configure the KV namespace

The worker reads site configuration from Cloudflare Workers KV. The platform's sync job (src/server/edge-sync) automatically publishes configuration to KV when you enable the edge worker for a brand in Settings → Edge Worker.

Verify KV access:

wrangler kv key get --binding GEO_KV "site:yourdomain.com"

Step 3 — Attach the route

In the Cloudflare dashboard, go to Workers → Routes and add:

*yourdomain.com/*  →  geo-seo-edge-worker

This activates the worker for all traffic on your domain.

Step 4 — Verify

Check that managed artifacts are served correctly:

curl https://yourdomain.com/robots.txt
curl https://yourdomain.com/llms.txt

Both should return the platform-managed versions. The worker passes all other requests to your origin unchanged.

Step 5 — Rollback

To roll back, remove the route in the Cloudflare dashboard. The worker script can remain deployed — removing the route is sufficient to stop all traffic interception.

Fail-open behaviour

Any exception, KV miss, or timeout in the worker passes the request straight to your origin unchanged. The worker never causes downtime.

Bot analytics

For bot requests, the worker sends a compact analytics event to the platform ingest endpoint. Human traffic is never sent to the platform. No PII is collected from human users by the edge worker.

Something missing? Let us know.