Question

Subdomain site needs HTTPS/SSL Cert

Posted January 15, 2022 104 views
NginxNode.js

Hello all, here is my dilemma. here is my setup

  • domain registered with google domain
  • main website is hosted on netlify
  • droplet on digital ocean running node
    • this droplet is going to be a subdomain to my main website
    • (main site) mysite.com, (droplet) api.mysite.com

I need to use or assign an SSL cert to my api.mysite.com. When I use the UI to assign a new cert to this sub domain I get the following error message “Failed to validate nameserver records: a non DigitalOcean Name Server was found for <mysite.com> domain.”

Any suggestions?

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.

×
Submit an Answer
1 answer

Hi @blocksyweb,

I’ll recommend using Certbot to install an SSL for your subdomain located on your Droplet. Take a look at this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04

It will provide you with an example of how to issue an SSL certificate for the domains on a specific droplet, in your case for api.mysite.com.

by Brian Boucheron
Let's Encrypt is a Certificate Authority (CA) that provides an easy way to obtain and install free TLS/SSL certificates, thereby enabling encrypted HTTPS on web servers. It simplifies the process by providing a software client, Certbot, that attempts to automate most (if not all) of the required steps. In this tutorial, you will use Certbot to obtain a free SSL certificate for Nginx on Ubuntu 20.04, and set up your certificate to renew automatically.