2024-01-20

setup ssl

I purchased my domain through name.com for long-term use, so unlike most cases where you get a free SSL certificate with automatic setup when you buy both your domain and hosting from the same provider, I had to purchase my domain and server from two separate providers.

That means I needed to manually request and configure a free UbiquiTLS™ Free TLS Certificate DV on my own.

Here's a quick walkthrough of the process for future reference.


First, generate a Certificate Signing Request (CSR) and private key via OpenSSL:

openssl req -new -newkey rsa:2048 -nodes -keyout ansatz.work.key -out ansatz.work.csr

Fill out the required information (domain, organization details, etc.) in your terminal, then copy the full content of the generated .csr file into the management portal for UbiquiTLS™ Free TLS Certificate DV.

Once the platform verifies that your CSR matches the information you provided, click the Issue button to proceed.

UbiquiTLS will validate your domain ownership through a DNS record:

  1. Log into your DNS management backend on name.com
  2. Add a new CNAME record using the hash value provided by UbiquiTLS
  3. Wait a few minutes for DNS propagation, and your certificate will be issued once validation passes

After issuance, you'll receive two files/contents: your server certificate and the CA intermediate bundle.

To set up SSL in Nginx, first combine your server certificate and the CA bundle into a fullchain.crt:

cat ansatz.work.crt ansatz.work.ca-bundle > ansatz.work.fullchain.crt

Then add these lines to your nginx.conf to point to your certificate files:

ssl_certificate /etc/nginx/ssl/ansatz.work.crt;                    
ssl_certificate_key /etc/nginx/ssl/ansatz.work.key;          ssl_trusted_certificate /etc/nginx/ssl/ansatz.work.ca-bundle;

Restart Nginx after updating the configuration, and SSL certificate will be live.

Same pathway for renew the SSL certificate.

renew

Renewing the SSL Certificate for ansatz.work

October 28, 2026

This is a continuation of my previous notes on setting up an SSL certificate for ansatz.work using UbiquiTLS™ Free TLS Certificate DV from Name.com.

The renewal process is largely the same as the initial setup, except that the domain ownership verification and certificate issuance are handled through the renewal interface.

Log into Name.com and navigate to My Products → SSL Certificates.

Find the existing UbiquiTLS™ Free TLS Certificate DV and select Renew.

Complete the renewal checkout (free of charge), then follow the certificate setup instructions.

If the platform requests a new Certificate Signing Request (CSR), generate one using OpenSSL:

openssl req -new -newkey rsa:2048 -nodes \
  -keyout ansatz.work.key \
  -out ansatz.work.csr

Submit the CSR through the Name.com interface and complete any required domain ownership verification.

Important: Keep the private key (ansatz.work.key) associated with the submitted CSR. If the original CSR is reused, the corresponding original private key must also be reused.

2. Retrieve the Issued Certificates

Once the certificate has been issued successfully, Name.com displays the following message:

Certificates have been issued.

The certificate management page provides two sections:

  • Server Certificate

  • CA Certificates

Copy the complete contents of the Server Certificate, including the BEGIN CERTIFICATE and END CERTIFICATE lines, and save them as:

ansatz.work.crt

Next, copy the required intermediate certificates from CA Certificates and save them as:

ansatz.work.ca-bundle

The CA Certificates section may contain both intermediate certificates and a ROOT certificate.

The root certificate is generally unnecessary for Nginx because it is already trusted by clients through their operating system or browser trust stores. Therefore, only the required intermediate CA certificates should be included in the CA bundle.

Do not copy section labels such as ROOT or Intermediate Certificate into the PEM files.

3. Generate the Full Certificate Chain

Combine the server certificate with the intermediate CA certificates:

cat ansatz.work.crt ansatz.work.ca-bundle \
  > ansatz.work.fullchain.crt

The resulting file should contain the certificates in this order:

Server Certificate
Intermediate CA Certificate(s)

The root CA certificate does not need to be included.

Check the new certificate's validity period and covered domains:

openssl x509 -in ansatz.work.crt \
  -noout -dates -subject -ext subjectAltName

Also verify that the certificate matches the private key:

openssl x509 -in ansatz.work.crt -pubkey -noout \
  | openssl pkey -pubin -outform DER \
  | openssl dgst -sha256

openssl pkey -in ansatz.work.key -pubout -outform DER \
  | openssl dgst -sha256

The two SHA-256 hashes must match.

4. Replace the Certificates in Nginx

Back up the existing certificate files before replacing them:

sudo cp -a /etc/nginx/ssl \
  /etc/nginx/ssl.backup.$(date +%Y%m%d-%H%M%S)

Install the renewed certificates:

sudo install -m 644 ansatz.work.fullchain.crt \
  /etc/nginx/ssl/ansatz.work.fullchain.crt

sudo install -m 600 ansatz.work.key \
  /etc/nginx/ssl/ansatz.work.key

sudo install -m 644 ansatz.work.ca-bundle \
  /etc/nginx/ssl/ansatz.work.ca-bundle

Ensure the Nginx configuration points to the correct files:

ssl_certificate /etc/nginx/ssl/ansatz.work.fullchain.crt;
ssl_certificate_key /etc/nginx/ssl/ansatz.work.key;
ssl_trusted_certificate /etc/nginx/ssl/ansatz.work.ca-bundle;

Unlike the original configuration, ssl_certificate now points to the complete certificate chain rather than the server certificate alone.

5. Reload Nginx and Verify

Test the Nginx configuration:

sudo nginx -t

If the test succeeds, reload Nginx:

sudo systemctl reload nginx

Finally, verify the certificate served by the website:

echo | openssl s_client \
  -connect www.ansatz.work:443 \
  -servername www.ansatz.work 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates

Confirm that the displayed expiration date corresponds to the renewed certificate.

Also check whether the certificate covers both www.ansatz.work and ansatz.work, particularly if both hostnames are used.


Renewal Notes

The overall process remains:

Renew on Name.com → Submit CSR if required → Complete domain validation → Copy Server Certificate and Intermediate CA Certificates → Generate fullchain → Replace Nginx certificates → Reload and verify.

Three details are worth remembering for future renewals:

  1. The private key must match the CSR used to issue the certificate.

  2. The CA bundle should contain the required intermediate certificates, generally excluding the root certificate.

  3. Nginx should use fullchain.crt for ssl_certificate to provide the complete certificate chain.

The certificate renewal does not require transferring the domain or changing the DNS configuration unless Name.com explicitly requests new validation records.

The current procedure remains manual, so the certificate expiration date should be checked before the next renewal.