Create Cert for subdomain

TL;DR

When I’ve created a cert for my subdomain, but it never propagates to my app and the site continues to have an unsecure connection.

Details
I’m attempting to point my-subdomain.my-domain.com at my-fly-app.fly.dev (fictional names here :wink:). I’m using Route53 to manage DNS. I created a DNS record “CNAME my-subdomain my-fly-app.fly.dev” under my-domain.com in Route 53. I then ran flyctl certs create my-subdomain.my-domain.com). The output includes
The certificate for my-subdomain.my-domain.com has been issued.
Hostname = my-subdomain.my-domain.com
DNS Provider = aws
Certificate Authority = Let’s Encrypt
Issued = ecdsa,rsa
Added to App = 10 minutes ago
Source = fly

However the site continues to have an unsecure cert.

Try running fly certs check <hostname> and see what it shows you? That will do a few things and then show you if we think the domain is configured correctly.

The certificate for sub.example.com has been issued.
Hostname = sub.example.com

DNS Provider = aws

Certificate Authority = Let’s Encrypt

Issued = ecdsa,rsa

Added to App = 12 minutes ago

Source = fly

This is what I get after running that command.

Ah, what do you mean when you say “unsecure connection”? If you visit https://sub.example.com what does your browser show you?

I think the certificate is working, is it possible you’re visiting http:// instead of https://?

1 Like

I hate myself… Thank you for the help! Always really appreciate the quick responses.

1 Like

Oh that’s a common issue. .dev domains automatically redirect to https, once you use a custom domain it behaves differently. You should be able to make your app do that redirect, though, feel free to post here if you can’t figure it out.