Password Resets when using Cloudflare

Hi,

I have configured Prerender & Cloudflare for my app for SEO reasons.

As part of the setup, you must remove the URL from Bubble settings. It is now all managed by prerender & Cloudflare. (Step 3 in procedure)

The only issue I have left to resolve is the password reset.

When the reset link is configured as https://myURL.com/reset_pw?reset=000… etc, I get the following issue:

When I revert to the bubbleapps URL, it works ok.

https:// appname.bubbleapps.io/ reset_pw?reset=1780…etc

Any ideas how I can tweak the URL or the token so it works with my preferred URL? I don’t want to show bubbleapps in the reset URL

Or is there a way to do it through the code in Prerender?

thx

What’s happening here is that Cloudflare or Prerender is accidentally stripping or blocking Bubble’s token verification. When a user clicks that link, Bubble needs to instantly read the ?reset=… token from the URL to validate the session. If Cloudflare strips the query parameters or Prerender serves a cached static version of the page instead of letting Bubble’s backend initialize, the verification fails and throws that generic error.

Since you’ve already unlinked the custom domain inside Bubble settings, you just need to tell Cloudflare and Prerender to step aside for that specific URL.

Here is how to tweak your setup:

1. Tell Prerender to ignore the reset page

Prerender is meant for bots, but it can sometimes interfere with regular user routes if the user-agent check isn’t perfect. You need to make sure the /reset_pw page bypasses it entirely.

Open your Cloudflare Worker script (where your Prerender logic lives).

Add a quick condition at the top to completely ignore the reset route and pass it straight to Bubble:

if (url.pathname.includes(‘/reset_pw’)) {

return fetch(request);

}

2. Create a Cloudflare Cache Rule

Cloudflare might be trying to cache the page shell aggressively.

Go to your Cloudflare dashboard and head to Caching > Cache Rules (or Page Rules).

Create a rule where the URL path contains /reset_pw.

Set the action to Bypass Cache.

(Optional) If you use Rocket Loader, disable it for this specific path as well, as it can delay Bubble’s core scripts from reading the URL parameters fast enough.

3. Check your Query String settings

In Cloudflare under Caching > Configuration, look at your Caching Level. Make sure it’s set to Standard. If it’s set to “Ignore Query String”, Cloudflare will literally chop off the ?reset=000… part before passing the request to Bubble, which guarantees the token will never reach your app.

Once you ensure Cloudflare passes the URL and parameters raw and untouched to Bubble for that single route, your custom domain links will start working perfectly

Thanks @ekpereogheneogaga2020 for suggesting a solution. Unfortunately, I plugged in the code, but I couldn’t make it work. The reset page gave the Cloudflare Timeout page:

I fed all the information into Claude and it came up with:

- The Prerender/Bubble integration intentionally requires removing the custom domain from Bubble, with Cloudflare acting as the sole “front door” routing all requests to Bubble. This means Bubble will always see bubbleapps.io as its domain internally — which is exactly why the password reset breaks. Bubble generates the reset token bound to bubbleapps.io, but the email link uses yourdomain.com.

Even though step #3 of the prerender document states to remove the URL from the bubble, Claude suggested putting it back. When I did, it worked ok; however, Bubble is asking for DNS records to be updated.

The prerender - bubble guide states “If your custom domain is connected inside both Bubble and Cloudflare at the same time, the two services create a redirect loop and your site becomes unreachable. Only one service can be the front door.”

However, it looks like it is working ok except for the DNS warning:

Anyone see an issue leaving that warning in place?

Don’t leave those DNS warnings there! It might work right now, but it’s a ticking time bomb. Eventually, Bubble will fail the SSL validation or flag the routing, and your whole site will go down. The guide is right—you can’t have two services fighting to be the front door.

The reason you got that 522 Timeout is because return fetch(request) on your custom domain created an infinite loop inside the Worker.

The clean fix is to remove the domain from Bubble again, but update your Worker code so the bypass explicitly points to your fallback Bubble URL. That stops the loop completely.

Try changing your Worker logic to this:

const url = new URL(request.url);

if (url.pathname.startsWith(‘/reset_pw’)) {

// Reroute directly to Bubble's backend, skipping the loop and Prerender

const bubbleUrl = \`https://your-app-name.bubbleapps.io${url.pathname}${url.search}\`;

return fetch(bubbleUrl, reques

t);

}

(Just swap in your actual bubbleapps.io URL)

This satisfies the Prerender setup, gets rid of the DNS errors, and keeps your password resets working perfectly on your custom domain.

Why are you wanting to pre-render the password reset page? That shouldn’t be listed on search engines really, and should redirect people away if they don’t have a valid token.

It sounds like the reset token isn’t being passed or recognized correctly when using your custom domain through Cloudflare/Prerender. Since it works on the bubbleapps.io URL, the issue is likely related to URL rewriting, redirects, or query parameter handling.

I’d check whether Cloudflare or Prerender is modifying the reset parameter in any way. Also verify that your custom domain is properly configured as the app’s primary domain in Bubble and that the reset page is receiving the full query string unchanged.

A good test is to compare the exact URL and query parameters received on both the Bubble and custom-domain versions.

Correct, I only want to prerender website marketing pages.

But I want to hide the Bubble URL in the password reset.

And if you click reset your password, the app logs you in and retains the Bubbleapps.io URL…

So, the customer may be confused as to whether they are in the correct app or not…

Unfortunately, with Prerender, they ask you to disassociate the URL with Bubble.

Looks like Bubble doesn’t like the password reset URL.

If you open up the APP usin the Bubbleapps.io URL, you get a password reset with the same URL, and. the password reset works ok.

When you open with mydomain.com, the email has a password reset URL, but Bubble will not reset the password. You get that same error as in the first post

Thanks to everyone who provided some advice on this post.

I tried to make this work with Fastpages, Prerender, and PageRabbit

  • Fastpages - easy to implement. Google page speed improved significantly, but crawlers didn’t recognize content
  • Prerender - difficult to implement. Page speed improved, and AI crawlers recognized content; however, it broke app features that needed the WebsiteURL like the password reset.
  • PageRabbit - easy to implement. Page speed improved, and AI crawlers recognized content. However, it left Bubble DNS warnings that I kept getting warnings about.

I decided to abandon the plans to Prerender the website and move the website to another platform like Webflow or Vercel, and use a subdomain for the app on Bubble.

As a post mortem, there are 2 issues with how Bubble functions that make what you are trying not worth the effort.

  1. Bubble apps are already proxied through Cloudflare. You’re essentially trying to reverse proxy a reverse proxy. There will be things that break even if you get things “working”
  2. Bubble apps are dynamically rendered during runtime. You get what you can get with SEO and lighthouse scores.

Ultimately, you’ll have to optimize within Bubble’s systems to squeeze the most out of it, or workaround it like what you’ve done. It’s not impossible, I’ve seen some impresive SEO work done on Bubble apps.