This is a common case of Cloudflare’s certificate pipeline conflicting with ours.
This is not what I see, I see Cloudflare IPs returned for the A record, which means Let’s Encrypt can’t issue an ALPN certificate for the domain since it resolves to Cloudflare.
The DNS certificate will also be failing as Cloudflare responds to TXT queries to _acme-challenge.arpitdalal.dev with their own challenge records. If you dig TXT _acme-challenge.arpitdalal.dev you’ll typically get different records than if you look up the TXT records of the CNAME target. The certificate issued for the www. subdomain fine, as Cloudflare does not inject any records on _acme-challenge.www.arpitdalal.dev.
The two options are:
If you aren’t using any Cloudflare features, you can disable “orange cloud” proxying and point your app at Fly.io directly
To work with the existing setup, import an origin certificate. See our Cloudflare guide for steps.
Thanks for the reply, but I have never configured Cloudflare for this domain. It is completely on fly. I had configured ALIAS DNS record before, here’s what I received from curl -Iv https://arpitdalal.dev before
╰─ curl -Iv https://arpitdalal.dev
* Host arpitdalal.dev:443 was resolved.
* IPv6: (none)
* IPv4: 66.241.124.237
* Trying 66.241.124.237:443...
* Connected to arpitdalal.dev (66.241.124.237) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to arpitdalal.dev:443
* Closing connection
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to arpitdalal.dev:443
Since www was working, I configured URL forwarding from apex to www temporarily.
I have now reverted DNS back to direct Fly A and AAAA, but it’s still failing on apex.
What I changed:
Removed the previous apex ALIAS/URL-forwarding setup I had temporarily enabled (that was only a fallback because www is working).
This seems to suggest that something about your DNS provider or domain registrar is inserting their own TXT records (which takes precedence over the ones over CNAME). You’ll need to contact them to have them remove these if that is the case.
Yes, that was the issue, seems like the TXT records were there from earlier, not sure why I added them. But it is resolved now. Thank you very much for your help!