CrawlClick docs
Menu and search

Rotate the CrawlClick site edge token

Rotating replaces your verified site's edge token in one step: you confirm by typing the exact host, the old token stops working on the proxy within seconds, and routed requests fall back to your origin until support installs the new token.

Status: Live

Each verified site has one edge token. It is a 64-character hexadecimal value that the Worker sends to the CrawlClick proxy as Authorization: Bearer with every routed request. The proxy accepts it only for the host it was issued to. CrawlClick stores only a hash of the token, so the token is shown in full only when it is issued: at verification and at each rotation. This page explains when to rotate it and what happens when you do.

When should I rotate the edge token?

Rotate when the token may have been exposed. For example:

  • it was committed to source control or pasted into a ticket, chat or document;
  • it appeared in a screenshot, a log, an analytics tool or a browser extension;
  • someone who had it has left the team;
  • you are not sure where a copy of it went.

The token alone cannot create billable traffic. The proxy also requires a separate platform secret that only CrawlClick’s Worker holds, and it verifies crawlers from their network address or signature, not from anything a token holder supplies. Even so, treat a leaked token as compromised and rotate it.

Rotation does not touch your DNS records, your publisher ID or the platform secret. You do not need to verify the domain again.

How do I rotate the token?

In the CrawlClick console, open Publisher, Sites, choose the site and select Rotate token. The console asks you to type the host. The value you type is trimmed, lower-cased and stripped of a trailing dot, then it must equal the verified host exactly. A host that differs in any other way is refused, so a slip cannot rotate a different site.

Status Message Meaning
200 Rotated. The body holds the new activation values.
422 confirm_host must exactly match the verified site host The typed host does not match.
409 site must be verified before rotation The site has not passed DNS verification.
409 site is not eligible for rotation The site is suspended.
404 site not found The site does not belong to your organisation.

A successful rotation returns the same shape as verification: the host, the new edge token, and a worker object with your publisher ID, the proxy URL, the beacon URL and the new token. The new token is shown once.

What stops working when I rotate?

Rotation replaces the stored hash at once and republishes the site directory that the proxy reads. The proxy reloads that directory every 10 seconds by default, so the old token stops working within seconds.

The Worker, however, still sends the old token until CrawlClick support replaces your custom hostname’s metadata. In that gap:

  • every routed request is refused by the proxy with 401 (invalid site edge credential);
  • the Worker treats the 401 as a failure and serves your origin’s response directly. See Failure behaviour;
  • crawlers and readers see your normal page, with no X-Crawlclick header;
  • no sponsored block is inserted and nothing is earned.

Your site stays up throughout. The only cost is the earnings missed during the gap.

How do I restore routing after a rotation?

  1. Ask CrawlClick support to replace the custom hostname metadata with the new values. Send the site ID and the time of rotation. Do not send the token in an ordinary support ticket. Support collects it through the controlled activation workflow.
  2. When support confirms, run the integration check or the curl commands on that page. The crawler probe should show X-Crawlclick: served again.
  3. Delete every copy of the old token. It no longer authenticates anything, but keeping old credentials around makes the next leak harder to judge.

If the check still shows the crawler probe as not routed after support confirms, the metadata probably still holds the old token. Ask support to confirm which rotation they installed.