CrawlClick edge failure behaviour (fail open to origin)
Any CrawlClick-path failure, whether a missing setting, a timeout, a network error or a proxy status of 400 or above, makes the Worker fetch your origin directly and return its response.
Status: Live
The edge is built so that an outage in CrawlClick’s monetisation never takes your site down. Every request that the Worker sends to the CrawlClick proxy has a fallback: if anything goes wrong, the Worker makes the original request to your origin with fetch(request) and returns that response. A crawler or reader never sees a CrawlClick error page. The cost of a failure is that one page is served without a sponsored block and without earnings. This page lists the failures from edge/cloudflare/worker.js and the proxy. Routing itself is on Request routing.
Which failures make the Worker fall back to my origin?
The Worker’s crawler handler falls back in four cases:
| Case | What triggers it |
|---|---|
| Not configured | The Worker has no proxy URL or no platform secret. |
| Network error | The request to the proxy throws: DNS, TLS, connection reset, or any other exception. |
| Timeout | The proxy has not answered within the timeout (below). |
Proxy status 400 or above |
Any 4xx or 5xx from the proxy, whatever its cause. |
A fallback response comes from your origin, so it has no X-Crawlclick header and keeps your own Cache-Control.
How long does the Worker wait for the proxy?
The request to the proxy has an abort timeout. The default is 8000 ms. A configured value is used only if it is a number from 500 to 30000 ms inclusive. Anything else, including a missing value, uses the default. When the timeout fires, the Worker fetches your origin directly. A slow proxy therefore costs a crawler at most the timeout plus one normal origin fetch.
Which proxy responses count as failures?
Any status from 400 up triggers the fallback, so a configuration mistake on CrawlClick’s side never reaches a crawler. The proxy returns these statuses itself:
| Status | Cause |
|---|---|
401 |
The platform secret is missing or wrong. |
401 |
The bearer token does not match the host: a rotated or mistyped token, an unverified or suspended site, or a host missing from the site directory. |
403 |
The publisher ID does not belong to the token’s site. |
400 |
The forwarded host or request path is invalid. |
431 |
Request headers are incomplete or larger than 8 KiB. |
503 |
The proxy is at capacity. It sends Retry-After: 1 and does not queue the request. |
502 |
The origin fetch failed: transport error, timeout, a response over 8 MiB, an origin that resolves only to non-public addresses, or a malformed response. |
What happens when my origin returns an error?
The proxy fetches your origin once, with no retries and no pacing, and relays whatever status it gets. A crawler owns its own rate limits, so the proxy passes your answer on and does not substitute its own. When that status is 400 or above, for example a 404, or a 503 with Retry-After, the Worker’s rule applies and it fetches your origin directly. The crawler gets your origin’s own response to that second request, with your headers, including Retry-After.
A 3xx is below 400, so the Worker does not treat it as a failure. The redirect reaches the crawler as your origin sent it, marked X-Crawlclick: served and Cache-Control: private, no-store.
When is a page served through CrawlClick without a block?
Some outcomes are not failures. The page still comes through the proxy with X-Crawlclick: served, but byte for byte as your origin sent it and with no charge:
- The crawler is unverified, suspected of spoofing, not ad-eligible, or in a training phase.
- The origin status is not
200, the body is not HTML, it has a content coding, it is not valid UTF-8, or it is larger than 2 MiB. - The page was already filled for the same engine inside the fill window, which defaults to one day.
- No campaign won the auction.
- The record of the insertion could not be written. CrawlClick does not serve a paid block it cannot account for, so it serves your page unchanged.
- The request is an AI referral. Production never places a block for a referred reader. See How the edge works.
How do I test the fallback?
The proxy rejects a request without the platform secret, so a publisher cannot easily break the CrawlClick path from outside. Two failures are visible from outside, though. A request for a path that returns 404 on your origin comes back with no X-Crawlclick header, because the Worker refetched it. After you rotate the token, routed requests fall back until support updates the hostname’s metadata. The curl commands on Test the integration show both.