Certificate Name Mismatch after deleting and reinstalling cert


#1

I had a certificate installed on hubcoding.com, but it had errors with subdomains. I deleted all the certificates and tried to start over.

I am now getting a “certificate name mismatch”.

If I run the command “sudo /home/ec2-user/certbot-auto certificates”, I see:

Found the following certs:
  Certificate Name: hubcoding.com
    Domains: *.hubcoding.com
    Expiry Date: 2018-07-09 22:13:11+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/hubcoding.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/hubcoding.com/privkey.pem

I did manually add Virtual host to the httpd.conf file:

Listen 80
<VirtualHost *:80>
    DocumentRoot "/var/www/html"
    ServerName "hubcoding.com"
    ServerAlias "www.hubcoding.com"
    ServerAlias "*.hubcoding.com"
</VirtualHost>

Can you think of what the problem could be?

thanks,
Ken


#2

Hi @hamlethub,

The certificate is covering *.hubcoding.com but not the base domain hubcoding.com. You need to issue the cert again but this time add both entries, -d hubcoding.com -d "*.hubcoding.com"

Cheers,
sahsanu


#3

Awesome, worked great!

Thanks!


#4

Thanks for using the quotes in the sample command with the * character, @sahsanu… I hope everyone will adopt that habit!


#5

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