CrawlClick docs
Menu and search

Test the CrawlClick edge integration with curl

The integration check fetches one path on your public host twice, once as GPTBot and once as a browser, and reports ready when the crawler probe comes back with X-Crawlclick served and private, no-store and the browser probe does not.

Status: Live

After your CNAME points at the CrawlClick hostname and its certificate is active, check that the edge sends crawler requests to CrawlClick and leaves ordinary readers alone. The console runs this check for you under Publisher, Sites, with Check integration. You can reproduce every part of it with curl. The check tests routing only. It does not verify a crawler or insert a block. It needs a verified site; see Verify your domain.

What does the integration check probe?

The check takes one path, / by default, and requests https:// plus your host plus that path from CrawlClick’s servers, twice:

Probe User-Agent Expected path
Crawler GPTBot/1.2 (+https://openai.com/gptbot) CrawlClick
Human Mozilla/5.0 (crawlclick integration check) Origin

Both probes send Accept: text/html,application/xhtml+xml, do not follow redirects, and give up after 12 seconds. For each response the check records three values:

  • status, the HTTP status;
  • crawlclick_routed, true when X-Crawlclick is exactly served;
  • cache_safe, true when Cache-Control, lower-cased, contains both private and no-store.

The result is ready when the crawler probe is routed and cache-safe with a status below 500, and the human probe is not routed with a status below 500.

The path must start with /, must not start with //, must not contain # or control characters, and must be at most 2,048 characters. Anything else is refused with 422.

How do I read the result?

{
  "host": "www.example.com",
  "path": "/",
  "ready": true,
  "crawler": { "status": 200, "crawlclick_routed": true, "cache_safe": true },
  "human": { "status": 200, "crawlclick_routed": false, "cache_safe": false },
  "message": "Worker routing and fail-safe human bypass are visible from the public Internet",
  "checked_at": 1796342400
}

checked_at is in Unix seconds. When ready is false, the message reads The public route is not ready; confirm the Worker route and current one-time credentials. These are the usual causes:

Observation Likely cause
crawler.crawlclick_routed is false, status 200 The hostname is not attached yet, or the CrawlClick path fell back: a stale token after rotation, or the proxy could not reach your origin.
crawler.crawlclick_routed is false, status 404 The path does not exist. A 4xx from your origin always falls back, so choose a path that returns 200.
human.crawlclick_routed is true The browser probe took the CrawlClick path, which the Worker’s rules should not allow for that request. Send the result to support.
A 502 response from the check itself A probe could not complete: TLS failure, timeout, or a malformed response.

If your site applies different rules to different routes, run the check on more than one content path.

How do I reproduce the check with curl?

Each command prints only the response headers. Replace the host with yours.

HOST=www.example.com

# 1. Crawler user agent: routed to CrawlClick.
curl -s -o /dev/null -D - \
  -A 'GPTBot/1.2 (+https://openai.com/gptbot)' \
  -H 'Accept: text/html' \
  "https://${HOST}/" | grep -iE '^(HTTP|x-crawlclick|cache-control)'

# 2. Ordinary client: origin path.
curl -s -o /dev/null -D - -H 'Accept: text/html' \
  "https://${HOST}/" | grep -iE '^(HTTP|x-crawlclick|cache-control)'

For command 1 expect your origin’s status, cache-control: private, no-store and x-crawlclick: served. For command 2 expect your origin’s status and its usual Cache-Control, with no X-Crawlclick header.

Which other cases can I test?

HOST=www.example.com
show() { grep -iE '^(HTTP|x-crawlclick|cache-control)'; }

# HEAD with a crawler user agent: not a GET, so origin path. No X-Crawlclick.
curl -s -I -A 'GPTBot/1.2' "https://${HOST}/" | show

# Crawler user agent that does not accept HTML: origin path. No X-Crawlclick.
curl -s -o /dev/null -D - -A 'GPTBot/1.2' -H 'Accept: application/json' "https://${HOST}/" | show

# A path your origin answers with 404: routed, then the Worker falls back. No X-Crawlclick.
curl -s -o /dev/null -D - -A 'GPTBot/1.2' "https://${HOST}/no-such-page-404" | show

# Browser navigation from ChatGPT: AI referral, routed. X-Crawlclick: served, page unchanged.
curl -s -o /dev/null -D - -H 'Accept: text/html' \
  -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Site: cross-site' \
  -H 'Referer: https://chatgpt.com/' "https://${HOST}/" | show

# The same navigation tagged with utm_source instead of a Referer: also routed.
curl -s -o /dev/null -D - -H 'Accept: text/html' \
  -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Site: cross-site' \
  "https://${HOST}/?utm_source=chatgpt.com" | show

# A Referer from chatgpt.com without the Sec-Fetch headers: not a referral. Origin path.
curl -s -o /dev/null -D - -H 'Referer: https://chatgpt.com/' "https://${HOST}/" | show

Without an Accept header, curl sends */*, which passes the Worker’s HTML check. The 404 case relies on the fallback described on Failure behaviour. The referral cases are measurement only and never carry a block in production; see Request routing.

How do I see a sponsored block?

You cannot trigger one from your own machine. A block is inserted only for a crawler that the proxy verifies from the vendor’s published IP ranges or a valid Web Bot Auth signature. Use the insertion evidence in the CrawlClick console to see what was served to real crawlers. Each block is an <aside class="crawlclick-sponsored"> whose text starts with Sponsored:.