The certificate generated by certbot only works for my main domain, and is invalid for subdomains

My domain is: saulofelipe.tech and server.saulofelipe.tech

I ran this command: sudo certbot certificates

It produced this output:

Found the following certs:

Certificate Name: saulofelipe.tech
Serial Number: 3e819a37302466111128ab24cd651c2fc71
Key Type: RSA
Domains: saulofelipe.tech
Expiry Date: 2024-04-03 02:34:32+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/saulofelipe.tech/fullchain.pem
Private Key Path: /etc/letsencrypt/live/saulofelipe.tech/privkey.pem

Certificate Name: server.saulofelipe.tech
Serial Number: 495c726470919bab0119b68dcaf06c2877d
Key Type: RSA
Domains: server.saulofelipe.tech
Expiry Date: 2024-04-03 02:37:36+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/server.saulofelipe.tech/fullchain.pem
Private Key Path: /etc/letsencrypt/live/server.saulofelipe.tech/privkey.pem

My web server is (include version): nginx

The operating system my web server runs on is (include version): ubuntu 22

My hosting provider, if applicable, is: hostinger

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 1.21.0

I will describe my problem as briefly as possible:

My main domain (saulofelipe.tech) is running a web application through vercel, that is, I have a nameserver of type "A" name "@" pointing to the vercel server and apparently everything works smoothly. However, after generating a certificate for my "server" subdomain it doesn't work, it's as if the certificate was invalid, I've already tried renewing it and the problem persists, if necessary, I can also put the nginx configuration file here, the idea is that this subdomain points to a server that is running on AWS EC2. Every help is welcome.

1 Like

Welcome @Saulo-Felipe

What exactly do you mean by "doesnt work". The cert looks fine for both your domains using this SSL Checker (and my own test system)

2 Likes

I mean, this happens:

@MikeMcQ Do you have any idea what could be happening?

Did you restart your browser? I'm not really sure what is wrong.

On my firefox I get a 403 Forbidden but no trouble with HTTPS part

And, SSL Labs even says it is okay

https://www.ssllabs.com/ssltest/analyze.html?d=server.saulofelipe.tech&hideResults=on

Do you see that "https" error on other devices?

2 Likes

Is your PC within a network behind either of these IPs?:

Name:    server.saulofelipe.tech
Address: 15.229.109.76

Name:    saulofelipe.tech
Address: 76.76.21.21

Show from PC:
curl -4 ifconfig.io

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.