Cloudflare Basic Setup 2024

Hi, I am trying to setup our Bubble app via Cloudflare DNS. There seems to lots of old information about legacy settings, which isn’t applicable.

I’ve set the domain registrar nameservers to point to CloudFlare (free) account.
On CloudFlare, I have setup the “A” records as per Bubble requirements:

  • 104.16.36.105
  • 104.16.42.105
  • 104.19.240.93
  • 104.19.241.93

I’ve also set these to NOT have proxy on. Ie set to “DNS Only”

These have propagated and checked via
https://toolbox.googleapps.com/apps/dig/

When I check the URL in browser I get a CloudFlare error page:

Error 1000 ## DNS points to prohibited IP

On Bubble settings > Domain/email
I have set the domain name, and clicking “Check My Settings” I get
“We found bad DNS records for xxxxx. These records are pointing to servers that do not belong to Bubble. A record 104.16.36.105, A record 104.16.42.105, A record 104.19.240.93, A record 104.19.241.93. It can take 24 hrs…”

That’s a strange message. It’s saying it can see the A records, and reporting the correct IPs… but still saying they are wrong??

Prior to this point, I have added and deleted the “domain name” in Bubble a LOT of times. I saw some info saying CloudFlare had some issue with issuing multiple certificates quickly/rate limit via Let’s Encrypt?

I have a couple of questions

  1. Once it actually is configured correctly, can you turn on PROXY STATUS in CloudFlare… if you can’t, there doesn’t seem much point in using CloudFlare?? I see some posts saying people have it working via Proxy, other posts say turn it off.

  2. Assuming CloudFlare and DNS is set correctly, is there some delay after setting the domain name in Bubble? ie if all DNS is propagated, and I am currently running Bubble on the test url, then I set the domain name in Bubble… I’d expect it to work immediately on the new domain URL. Is this incorrect? Does something happen between Bubble/Cloudflare when the domain is entered??

@alcatravis I have all of my bubble apps configured through Cloudflare, and proxied, although not everything works within Cloudflare, you do have some control over traffic and can monitor performance. When proxied, Bubble will say there are bad DNS records and say their infrastructure doesn’t support IPV6 lookups, but you can ignore those (had them for almost 2 years now).

Now, the fact that you are receiving a Error 1000 when navigating seems weird which implies CF has those IP’s flagged. Try enabling Proxy and give it a couple of minutes to propagate/settle down.

2 Likes

@aestela I’d love to pick your brain more about setting up Cloudflare proxying woth Bubble. What sort of pageload speed improvements did you see, and when you say ‘although not everything works within Cloudflare’ do you mean certain features don’t work in a proxy environment, or do you mean you had to use tools outside of Cloudflare?

I started exploring the Cloudflare route in order to force some page security headers and implementing WAF rules to limit access to the app to some specific countries.

Regarding speed improvement… I’d say 0 to none… since Bubble is already being served through CF, there is no improvement to be found there.

When I say not everything works, for example, forcing HSTS, doesn’t work, some headers won’t show, and custom hostnames won’t work (at least, I haven’t been able to configure them)

In the end, It gives me peace of mind that I can trigger an “under attack mode” which will force a challenge on page load and restrict countries I don’t want to be exposed to, along with traffic logs and statistics.

1 Like

Thanks for your reply! In terms of proxy, I’m surprised to hear you didn’t have noticeable load times. Bubble on mobile can take 5-8 seconds for me as it loads all the javascript first - and I’d certianly love to get that down to 1-2 seconds, especially a landing page, and I hoped Cloudflare was the answer.

When I check CF support:

One possible error says :
An A record within your Cloudflare DNS app points to a Cloudflare IP address

Checking the list of CF IPs, includes:
104.16.0.0/13
Which is (According to: Free online IPv4 subnet calculator - adminsub.net)
First IP 104.16.0.1
Last IP 104.23.255.254

(Bubble requirements to set them to:

  • 104.16.36.105
  • 104.16.42.105
  • 104.19.240.93
  • 104.19.241.93
    )

So it seems like the Bubble servers are Cloudflare servers and CloudFlare DNS settings don’t like pointing to them??

@aestela Hi. I faced a situation when namecheap-cloudflare-bubble.io connection set up correctly (more than 48hrs ago), I don’t see any errors except “bad dns” which you noted, BUT no settings in cloudflare influence access to my website.

I set up firewall to block all of the traffic or set up under attact, and no effect on my website. Do you have any suggestions what can solve it, to make my cloudflare work?

Hi @vladimir I migrated the Nameservers to Cloudflare altogether, I don’t know if that has any kind of impact on things working or not, shouldn’t but… these things are usually temperamental.

@aestela when you say “migrated the Nameservers to Cloudflare altogether” do you mean that for the domain “myfundomain.com” you went to the registrar DNS for “myfundomain.com” and pointed the Nameservers to Cloudflare’s nameservers?

@aestela Then, on Cloudflare, did you set up Cloudflare’s DNS for “myfundomain.com” to point to Bubble.io’s IP addresses that Bubble.io provides?
104.16.36.105
104.16.42.105
104.19.240.93
104.19.241.93