NET::ERR_CERT_COMMON_NAME_INVALID error on installing letsencrypt

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: magento2.vismayaonline.com

I ran this command: sudo certbot-auto --apache

It produced this output:

My web server is (include version): apache2 2.4.18

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

My hosting provider, if applicable, is: Go Daddy

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):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.9.0
I have checked for the errors in the community, but I couldn't find anything that coul help me
After installation of the certificate I get this error
NET::ERR_CERT_COMMON_NAME_INVALID

I have created the certificate for magento2.vismayaonline.com

Can someone helpme with this?

Regards,
Sujatha

2 Likes

Output produced:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?


1: magento2.vismayaonline.com
2: www.magento2.vismayaonline.com


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf


Congratulations! You have successfully enabled
https://magento2.vismayaonline.com


IMPORTANT NOTES:

  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/magento2.vismayaonline.com/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/magento2.vismayaonline.com/privkey.pem
    Your cert will expire on 2021-01-24. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot-auto
    again with the "certonly" option. To non-interactively renew all
    of your certificates, run "certbot-auto renew"

  • If you like Certbot, please consider supporting our work by:

    Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
    Donating to EFF: https://eff.org/donate-le

Shows certificate installed successfully

1 Like

Hi @sujathaupadhyaaya

your configuration is wrong. More specific: There is a wrong redirect to an ip address, that can't work.

See https://check-your-website.server-daten.de/?q=magento2.vismayaonline.com

Your certificate is new and used:

CN=magento2.vismayaonline.com
	26.10.2020
	24.01.2021
expires in 90 days	magento2.vismayaonline.com - 1 entry

But you have fatal redirects:

Domainname Http-Status redirect Sec. G
http://magento2.vismayaonline.com/ 139.59.2.4 302 http://139.59.2.4/?SID=4hgkaa3dc3057rldl38s2pt37q 0.390
http://139.59.2.4/?SID=4hgkaa3dc3057rldl38s2pt37q GZip used - 12341 / 93685 - 86,83 % 200 Html is minified: 147,51 % 0.717 H
https://magento2.vismayaonline.com/ 139.59.2.4 302 https://139.59.2.4/?SID=s701o23aadkvcdckmdidksfop1 5.343 B
https://139.59.2.4/?SID=s701o23aadkvcdckmdidksfop1 GZip used - 12327 / 93803 - 86,86 % Inline-JavaScript (∑/total): 9/3027 Inline-CSS (∑/total): 0/0 200 Html is minified: 147,45 % 5.610 N
Certificate error: RemoteCertificateNameMismatch

Your certificate doesn't have an ip address, so the result is always invalid.

But that's not a problem of your certificate, that's a general problem of that configuration.

Why is there such a redirect? A content management system?

1 Like

@JuergenAuer Thank you so very much.. My application was redirecting to ip address. I was able to fix this..Thanks a lot!

Best Regards,
Sujatha

3 Likes

I'm curious why this www exists and if you are using it?
If not, you might want to remove it from your configs.
If so, you might want to include it in the cert (choose "1,2" instead of just "1").

READERS: Get involved. Be heard. Do your part, it starts with: If you read something you like; then like it :heart: !

1 Like

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