Hi, I deployed a Remix app to fly.io today, but now I’m having trouble with DNS. Here’s what I did:
- Deployed the app
- Added a cert, following the directions to set the A and AAAA records, and then the CNAME record for Let’s Encrypt to authenticate
- SSL was successfully added
- on my DNS provider’s site, I also added a CNAME record from the www subdomain to the apex domain
So I can get to my site at https:www.domain.com with no difficulty, but the first time I go to https://domain.com, I get an error saying the site can’t be reached and the domain unexpectedly closed the connection.
If I go the to https://www.domain.com, then it resolves correctly, and from then on the bare apex domain will work as well.
What do I need to do to get https://domain.com to work on the first try?
The actual domain is PlayfulPlatypus.com
For which domains did you add a cert? You’ll need one for the apex, and another for www or wildcards.
Oh, I didn’t realize a cert for both. I added the apex one and that fixed it. Had I added the apex one first, the fly certs create command supplied the helpful hint:
Your certificate for playfulplatypus.com is being issued. Status is Awaiting certificates. Make sure to create another certificate for www.playfulplatypus.com when the current certificate is issued.
But because I added the wildcard first, I didn’t realize I needed to do both. It might be helpful for the custom-domains-with-fly docs page to mention that you will likely need both.
Thanks so much for the help!