Report this

What is the reason for this report?

LetsEncrypt SSL cert for subdomain only

Posted on March 10, 2021

The nameserver for my base domain is Google, which I’d like to keep to handle my product website & email. I’ve added the DigitalOcean NS entries for my subdomain app. This all resolves fine.

However, I’m trying to create an SSL cert in the DO panel, and it fails to recognize my subdomain (app.domain.com) for the cert without using the primary domain (domain.com) which won’t work because it’s on Google.

Is there a way to create a cert in DO panel for just a subdomain or will I need to create one manually?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @kdumont,

If you are using a standard Droplet, you should be able to install certbot from inside of it.

How does it work?

  • Point the subdomain’s A record to your Droplet
  • SSH to your Droplet
  • Make sure you have a WebService like Nginx or Apache

Nginx To install certbot and it’s Nginx plugin you can execute the following command on your Droplet:

sudo apt install certbot python3-certbot-nginx

Apache

To install certbot and it’s Apache plugin you can execute the following command on your Droplet:

sudo apt install certbot python3-certbot-apache
  • Obtaining an SSL Certificate

Certbot provides a variety of ways to obtain SSL certificates through plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary. To use this plugin, type the following:

Nginx

sudo certbot --nginx -d example.com -d www.example.com

Apache

certbot --apache

That should be it.

Regards, KFSys

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.