CloudFlare DNS + Fly.io issues

After successfully deploying this site for free on fly.io, I wanted to use my own custom domain, but first I had to buy it.

I actually found the cheapest place to buy domain names.

Surprisingly, it's CloudFlare; after comparing with Google Domains and NameCheap. I found that CloudFlare sells .com domains for $9.15 a year compared to $12+ a year elsewhere.

The CloudFlare Registrar markets that they cut out the middleman and you pay what they pay. https://www.cloudflare.com/products/registrar/

DNS Issues

The worst part of software engineer is integration. Ooooo, I found the shiny, cheap domain registrar... but it doesn't play nice with my new, awesome hosting platform.

I tried to the best of my abilities to diligently follow the docs on fly.io but my domain would not redirect correctly. I kept getting stuck at the issuing certificates phase.

I scoured the fly.io help forums and found this thread, describing my exact problems.

Certificate stuck at Awaiting certificates
What commands are you using to create the certs (and in what order?). I can see that there’s currently not a cert for tiffr when I try to curl it. Would you mind sharing your DNS records (you can send them to support@fly.io if you don’t want to post here).

TLDR; what worked for me was navigating to https://fly.io/apps/<APP NAME>/certificates and adding new certificates for the apex domain (winstonzhao.com) and the www domain (www.winstonzhao.com), skipping the DNS challenge (_acmechallenge. CNAME).

make sure that the proxy status is DNS only otherwise it won't work!!

I had to try this about 5x times before it just magically worked. 🎉

Conclusion

Googling to the rescue. Hopefully, this is helpful!

P.S. Don't forget to update your fly.toml's url to your new fancy-smancy domain! and run flyctl deploy again.

Subscribe to winnie's homebase

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe