Hi, everyone.
I have an issue where https://domain.com
works but https://www.domain.com
doesn’t. For context, I followed the How to Do Custom Domains With Fly tutorial and started by adding A
and AAAA
records as instructed:
A @ [v4 address]
AAAA @ [v6 address]
Was I right to use @
as the host here? Then, I created a domain.com
certificate for my-app
. Here’s what I did (with placeholder names):
➜ (main) flyctl certs create -a my-app domain.com
Your certificate for domain.com is being issued. Status is Awaiting certificates. Make sure to create another certificate for www.domain.com when the current certificate is issued.
Looks good and after a few minutes I could access https://domain.com
but not www.domain.com
. Then, as was suggested, I created a certificate for www.domain.com
by doing the following:
➜ (main) flyctl certs create -a my-app www.domain.com
You are creating a certificate for www.domain.com
We are using Let's Encrypt for this certificate.
You can configure your DNS for www.domain.com by:
1: Adding an CNAME record to your DNS service which reads:
CNAME www. my-app.fly.dev
So, I went to hover and added the new CNAME
record. Up to now, I’ve added A
and AAAA
records as well as the CNAME
mentioned above.
That tutorial goes on to suggest using flyctl certs show -a my-app
to watch your certificates being issued but that command doesn’t work (error below) so I guess the API has changed since it was written. I look in my dashboard and see both certificates but the www.domain.com
is showing as not verified. I did this on Saturday initially and figured I should wait at least a day for DNS propagation but now, on Monday, it’s still not working. Any thoughts?
Here’s the output from the flyctl certs show -a my-app
command. I’ve tried running it with app name and then flags, as it suggests, but that doesn’t work.
➜ (main) flyctl certs show -a my-app
Error: accepts 1 arg(s), received 0
Usage:
flyctl certs show <hostname> [flags]
What does work, however, is flyctl certs show domain.com
so maybe the documentation needs updating here as it’s a little confusing.
What am I missing here? It doesn’t seem like a DNS propagation issue.
Thanks in advance!