Skip to content
  • There are no suggestions because the search field is empty.

Why does Prerender.io show "Integration not detected" after setting up Cloudflare?

Your Cloudflare Worker is deployed and the route is active, but Domain Manager still says the integration is not detected. Here is how to find and fix the cause.

 TL;DR

The "Integration not detected" error means Prerender.io's validation check did not receive the x-prerender-request-id header when it tested your domain. With Cloudflare, the most common causes are: DNS records set to DNS-only instead of Proxied, a Worker route pattern that does not match your domain, a missing or incorrect PRERENDER_TOKEN environment variable, or Cloudflare security features blocking the validation request. Work through each check below in order.

Why this matters

Until the integration is verified, Prerender.io is not serving cached pages to AI crawlers and search engines on your domain. Every crawler request hits your origin directly, which means slower responses, unrendered JavaScript content, and reduced visibility in AI-generated answers and search results.

Before you start

Run a quick manual test to confirm whether the issue is real or transient. Open Chrome DevTools, switch the User-Agent to Googlebot (via Network Conditions), and load your site. Check the response headers for x-prerender-request-id.

  • Header present? The integration works. The Domain Manager validation may have hit a temporary issue. Wait 2 to 5 minutes and re-run validation.
  • Header missing? The integration is not intercepting requests. Work through the causes below.

You can also test from the command line:

curl -A "Googlebot" -I https://yourdomain.com

Look for x-prerender-request-id in the response headers.

Common causes and fixes

1. DNS records are not proxied (orange cloud)

Cloudflare Workers only run on traffic that passes through Cloudflare's network. If your DNS record is set to DNS-only (gray cloud), requests go directly to your origin and bypass the Worker entirely.

How to check: Open your Cloudflare dashboard, go to DNS > Records, and look at the Proxy status column for your domain's A or CNAME record.

Fix: Click the gray cloud icon to switch it to Proxied (orange cloud). Changes propagate within a few minutes.

ℹ️ If you use Cloudflare for DNS only and cannot enable proxying, the Cloudflare Worker integration will not work. You need a server-side integration instead (Nginx, Apache, Node.js, or another supported method). See Available integrations.

2. Worker route does not match your domain

The Worker route pattern determines which requests trigger the Worker. If the pattern does not match your domain or misses certain URL paths, the Worker never executes for those requests.

Common route mistakes:

Route pattern

Problem

example.com/*

Misses www.example.com requests

www.example.com/*

Misses non-www requests

*.example.com/*

Matches subdomains but may miss the root domain on some Cloudflare configurations

example.com/blog/*

Only matches /blog/ paths, misses everything else

How to check: Go to Compute (Workers & Pages) > your worker > Settings > Domains & Routes. Verify the route pattern covers both www and non-www if applicable.

Fix: Use *example.com/* to match both example.com and www.example.com. If you only use one variant, make sure the route matches that exact variant.

3. PRERENDER_TOKEN is missing, misspelled, or set as a secret instead of a variable

The Worker reads your Prerender.io token from an environment variable named PRERENDER_TOKEN. If the variable is missing, named differently, or contains an incorrect value, the Worker cannot authenticate with Prerender.io.

How to check: Go to Compute (Workers & Pages) > your worker > Settings > Variables and Secrets. Confirm:

  • A variable named exactly PRERENDER_TOKEN exists (case-sensitive)
  • The type is set to Text (not Secret, which some Worker code cannot read depending on implementation)
  • The value matches the token shown in your Prerender.io dashboard under Security and Access > Prerender Token

Fix: If the variable is missing, add it. If the value looks wrong, copy the token fresh from your Prerender.io dashboard and paste it in. Make sure there are no leading or trailing spaces.

4. Worker code is outdated or modified

The Cloudflare Worker script must correctly identify bot User-Agents, forward the request to service.prerender.io, and pass the token in the headers. If the code has been modified, uses an outdated bot list, or has a syntax error, the integration breaks silently.

How to check: Go to Compute (Workers & Pages) > your worker > Code and compare your deployed code against the current version in the Prerender.io Cloudflare Workers integration guide.

Fix: If your code differs from the current guide, replace it with the latest version. Redeploy after updating.

5. Cloudflare security features are blocking the validation request

Cloudflare's security settings can block or challenge requests from Prerender.io's validation check, preventing it from confirming the integration. Common blockers include:

  • Bot Fight Mode or Super Bot Fight Mode blocking automated requests
  • WAF rules that challenge or block requests without a browser fingerprint
  • Under Attack Mode serving a JavaScript challenge page instead of your content
  • IP Access Rules blocking Prerender.io's IP ranges

How to check: Go to Security > Events in your Cloudflare dashboard. Look for blocked or challenged requests from Prerender.io's IP ranges or User-Agent around the time you ran the validation.

Fix: Create a WAF exception rule that skips security checks for requests matching the Prerender.io User-Agent (Prerender (+https://github.com/prerender/prerender)). Alternatively, allowlist Prerender.io's IP ranges in your Cloudflare firewall rules. See How do I allowlist Prerender.io's IP addresses? for the current ranges.

6. Another Worker or Page Rule is intercepting the request first

If you have multiple Workers or Page Rules on the same domain, a different Worker may execute before the Prerender.io Worker and return a response without ever reaching the Prerender.io logic.

How to check: Go to Compute (Workers & Pages) and check if other Workers are assigned to routes that overlap with your Prerender.io Worker route. Also check Rules > Page Rules for conflicting rules.

Fix: Ensure the Prerender.io Worker route is the most specific match for your domain, or integrate the Prerender.io logic into your existing Worker if you can only have one.

7. Worker failure mode is set to "Fail closed"

When creating the Worker route, Cloudflare asks you to set a failure mode. If set to Fail closed, any Worker error (timeout, exception) returns an error page to the visitor instead of falling through to your origin.

Fix: Set the failure mode to Fail open (proceed). This ensures that if the Worker fails for any reason, requests still reach your origin and your site remains accessible.

8. The integration was removed or disabled

If a domain was previously integrated with Prerender.io and the Worker route or Worker itself was later removed, disabled, or reassigned, Prerender.io detects the change immediately and reverts the domain's status to "Integration not detected." This is not a delayed check. Prerender.io validates continuously.

How to check: Confirm the Worker is still deployed, the route is still active, and the environment variable is still set. If a colleague or automated deployment removed or redeployed the Worker, the integration may have been lost.

Fix: Redeploy the Worker with the correct route and PRERENDER_TOKEN variable. Re-run validation in Domain Manager.

 

After fixing

  1. Redeploy your Worker if you changed code or environment variables.
  2. Wait 2 to 5 minutes for changes to propagate.
  3. Re-run the manual curl test to confirm x-prerender-request-id appears.
  4. Go to Domain Manager in your Prerender.io dashboard and re-run validation.

✅ The integration is working when Domain Manager shows Verified and your curl test returns the x-prerender-request-id header.

If validation still fails after working through all seven checks, Nexus, your AI integration assistant, can help diagnose the issue. Open Nexus from your Prerender.io dashboard and describe what you have tried.


Related articles



💬 Still need help? If you have worked through all eight checks and the integration is still not detected, our support team can review your Worker configuration and Prerender.io logs. Include your domain, Worker name, route pattern, and the output of your curl test. → Contact us at support@prerender.io

 

Was this article helpful?