How to Integrate Prerender with Bubble Using Cloudflare
This guide helps you enable Prerender for a Bubble-hosted website while keeping your site on Bubble. It is designed for non-technical users and avoids common Cloudflare errors by using Cloudflare Workers Custom Domains as the “front door”.
What to Expect
This integration takes ~45 minutes. Prerender connects to your Bubble site through Cloudflare. It sits in front of your domain and intercepts requests from bots before they reach your site. Without Cloudflare managing your domain's DNS, there is no way for Prerender to slot into the request flow.
How it Works
|
Browser |
|
Cloudflare |
|
Prerender |
|
Bubble |
|
User or bot visits your domain |
→ |
Routes the request |
→ |
Intercepts bot requests, serves pre-rendered HTML |
→ |
Hosts your site, continues working as normal |
Nothing changes about how you use Bubble. You're only adding Cloudflare as the front door.
Before you start
You will need:
-
Your Bubble hosted URL (example:
yourapp.bubbleapps.io) -
Your custom domain (example:
yourapp.com) -
Your Prerender token (available in your Prerender account)
- Cloudflare account with your custom domain added (see setup instructions below)
Don't have Cloudflare set up?
Complete the Cloudflare setup first, then come back here and continue with the steps below. Here’s what the process involves:
- Create a free Cloudflare account: https://dash.cloudflare.com/sign-up
- Add your root domain (example:
yourapp.com) - Review your DNS records
- Log in to your domain registrar and replace the nameservers with Cloudflare's nameservers. The change propagation can take a few minutes up to a couple of hours, but you don't need to wait — continue to the next steps. Your custom domain may be temporarily unreachable during this time, but your site remains accessible via your Bubble hosted URL (
yourapp.bubbleapps.io).
Follow the detailed Cloudflare guide here.
Step 1: Important: Remove the custom domain from Bubble
Disconnect your custom domain from Bubble. If your domain is connected inside both Bubble and Cloudflare, the two services create a “redirect loop”, and your site becomes unreachable. Only one service can be the “front door” at a time. In this setup, that’s Cloudflare.
-
Open your Bubble project
-
Go to Settings -> Domain and Email
-
Remove the custom domain (example:
yourapp.com,www.yourapp.com)
You can still use your custom domain publicly. Cloudflare will handle it and route requests to Bubble.
Step 2: Remove A record from Cloudflare
The existing records conflict with the Cloudflare Worker mapping you'll create and need to be removed first.
- Go to Domains and click on your domain
- In the left sidebar, click DNS → Records
- Delete all A records where the Name is
wwworyourapp.com
Step 3: Create a Cloudflare Worker
-
Log in to Cloudflare
-
Go to Compute → Workers & Pages

-
Click Create application

-
Choose Start with Hello World!

-
Name it something like
bubble-prerender -
Click Deploy
Step 4: Add your Prerender token to the Worker
-
Open your Worker
-
Go to Settings
-
Find Variables and Secrets
-
Add a Secret:
-
Name:
PRERENDER_TOKEN -
Type: Plaintext
-
Value: (paste your Prerender token)

-
- Add the Bubble Upstream as a secret
- Name: BUBBLE_UPSTREAM
- Type: Plaintext
- Value: Bubble hosted address (example:
https://yourapp.bubbleapps.io)
-
Deploy
Step 5: Attach your custom domain(s) to the Worker (Custom Domain)
This is the key step that makes your domain work reliably through Cloudflare. By attaching your domain directly to the worker, you avoid common errors like Error 1014 and Error 1000.
-
In your Worker, open Settings
-
Click +Add next to Domains & Routes

- Select Custom domain

-
Enter your domain (add as many custom domains as you need, including www)

-
Cloudflare will automatically create the needed DNS/certificate setup
When done, Cloudflare DNS will show a special Worker mapping for your domain.![]()
Step 6: Paste the Worker code
-
In Cloudflare, open Compute → Workers & Pages → Your Worker
-
Click Edit code
-
Replace everything with the code on this link.
-
Save and deploy
Final Check: Verify Prerender Is Working
Option 1: Simulate a Googlebot visit in Chrome
To confirm Prerender is working, you’ll simulate a Googlebot visit in Chrome and check the response headers for x-prerender-request-id. If this header is present, Prerender is serving pre-rendered HTML to bots and your integration is complete.
For the full step-by-step verification process, see: Verify Your Prerender Integration
Option 2: Verify Integration within your Prerender Account
Navigate to the Verify Integration step in your Prerender account and submit your domain for verification.
You’re all set!
Prerender will serve pre-rendered HTML to bots, while real users continue getting your Bubble site.
Support
If you encounter any issues with this integration, please contact our support team for assistance.