Cloudflare custom domain configuration

Edit: I just realized cloudflare has been having issues for close to 24 hours. Maybe that’s what is causing my problems

At first I tried using CNAME with cloudflare and waited 12 hours with no results. I began to wonder if these docs are out of date. The specific instructions for cloudflare didn’t seem to work.

Then I found custom domains with fly which honestly reads to me kind of confusing. For example, what is “our proxy name nginxproxy.fly.dev” referring to? Where should I point my CNAME?

Finally I simply decided to go with what fly UI recommends after certificate creation (A and AAAA records). However, even this is not resulting in any success. My understanding is that cloudflare should propagate very quickly. What am I missing?

Hi,

Yep, Cloudflare was having a lot of issues yesterday. The longest status update I’ve ever seen https://www.cloudflarestatus.com/ But that should now be resolved :thinking:

Normally you’d either add a CNAME record (yep, to your-app-name-here.fly.dev) or add the A and AAAA records.

Note that you don’t use "nginxproxy’. You would use your app name. The CLI and dashboard will show you that. It will be random if you didn’t specify an app name when deploying for the first time.

Having added either of those DNS records, you request a certificate from Fly.

Fly bot then goes and checks you own that domain. It does that by checking for a CNAME or A/AAAA record. If it sees the expected ones, it knows yep, you do own the domain so all good. Issues the certificate.

Then you can use https://your-domain-here.com. That works because now the Fly proxy knows which app to send those requests on to. Else it wouldn’t know what to do with your-domain-here.com.

You can see how it’s getting on using flyctl certs show your-domain-here.com

If it failed because of Cloudflare’s issues (entirely possible) it may be worth deleting the cert in Fly and starting again by requesting a new one flyctl certs create your-domain-here.com.

See:

1 Like

Everything is working now with the A records. To be sure I understand, the *edgeapp.net is the predecessor of fly.dev? Or something else but retired altogether?

Is it recommended to use CNAME over A with cloudflare as the presence of this doc suggests?

Nice.

Yep, I believe Fly initially provided JS apps. I think they called them edge apps so that would make sense. They then expanded/pivoted to deploying Dockerfile-based apps, globally.

As for CNAME/A, I don’t think it matters. There can be cases where you have to use one/other. Like if you are using an apex/root custom domain, sometimes you can’t use a CNAME record so have to use A/AAAA. Cloudflare solves that behind the scenes but other DNS providers may not.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.