Certbot / Nginx Wildcard issue

Hello all,

I tried to issue the wildcard cert for my domain, but I have the problem:
curl https://something.something
curl: (51) SSL: certificate subject name (*.something.something) does not match target host name ‘something.something’

My domain is: :slight_smile:

I ran this command:
sudo docker run -it --rm --name certbot
-v “/etc/letsencrypt:/etc/letsencrypt”
-v “/var/lib/letsencrypt:/var/lib/letsencrypt”
certbot/certbot certonly --agree-tos --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory -d mydomain -d ‘*.mydomain’

It produced this output:
SSL: certificate subject name (*.costam) does not match target host name ‘costam’

My web server is (include version):
nginx version: nginx/1.10.3 (Ubuntu)

The operating system my web server runs on is (include version):
Ubuntu Server 16.04

My hosting provider, if applicable, is:
Aruba

I can login to a root shell on my machine (yes or no, or I don’t know):
Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):
Only for DNS - Cloudflare

Could you please help me? :slight_smile:

From what it looks like, you need to include the actual domain as well as the wildcard.

-d example.org -d "*.example.org"

A certificate for only *.example.org is not valid for example.org.

Please don’t redact your domain. It makes it super difficult to help you.

2 Likes

In fact, I did it this way:

Yes, I read that in your original post.

However, something is clearly wrong with the certificate that is installed, and it’s very unlikely to be able to help you unless we know what the domain is so we can look up the issued certificates.

3 Likes

Thank you for help, I used wrong brackets ' ' instead of " " :wink:

sudo docker run -it --rm --name certbot
-v "/etc/letsencrypt:/etc/letsencrypt"
-v "/var/lib/letsencrypt:/var/lib/letsencrypt"
certbot/certbot certonly --agree-tos --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory -d something -d "*.something"

Now it is working :slight_smile:

1 Like

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