eugene-khyst/letsencrypt-docker-compose

How to get certificate for subdomain?

Closed this issue · 3 comments

Bijig0 commented

I have my frontend deployed via netlify and with https at my domain, mydomain.com. I would now like to use this project to deploy my backend on a separate VM under the subdomain api.mydomain.com, what is the configuration to do this? Currently, in the interactive prompts given by the CLI there is only the option to use a www subdomain and nothing else. Thanks

Hi @Bijig0,

Just specify api.mydomain.com as your domain name and don't use www subdomain:

What's your domain name?: api.mydomain.com
Want to have 'www' subdomain?: No

Make sure to add A, AAAA or CNAME DNS record for the domain api.mydomain.com.

If you also want to get certificate for apex domain mydomain.com, add it as a separate domain to the config.

@Bijig0 , have you received a certificate for your subdomain?

Bijig0 commented

@eugene-khyst Oh I didn't see the reply and ended up using a separate domain I had available to host my backend. I'll try use the subdomain for future projects tho, thanks for your reply :)