Certificate mismatch Ubuntu

Please fill out the fields below so we can help you better.

The domain is:
www.wearegirlhood.com

I tried to access my website over mobile network. At wearegirlhood.com it returns ‘your connection is not private’. NET::ERR_CERT_COMMON_NAME_INVALID. At www.wearegirlhood.com is returns ‘this site cannot be reached’ ‘DNS address could not be found’ ERR_NAME_NOT_RESOLVED

A certificate analysis returns not trusted.
https://www.ssllabs.com/ssltest/analyze.html?d=wearegirlhood.com

The site is hosted on a LAMP Ubuntu 16.04 with Digital Ocean. I’m not using a control panel and I have root shell access. I’m new to all managing server so any pointers in the right direction would be hugely appreciated.

As SSL Labs shows, the certificate is only for “WWW.wearegirlhood.com”.
You should regenerate the certificate to include both names (wearegirlhood.com & www.wearegirlhood.com).

Thank you very much for your reply. that is what I figured, I tried doing this with sudo certbot delete deleted both of the file. I think tried to install them by running the command sudo certbot --apache -d wearegirlhood.com -d www.wearegirlhood.com which returned the error

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/wearegirlhood.com-le-ssl.conf: No such file or directory

The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError("Error while running apache2ctl configtest.\nAction 'configtest' failed.\nThe Apache error log may have more information.\n\napache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/wearegirlhood.com-le-ssl.conf: No such file or directory\n",)

How can I create that file?

Ok, I believe I have solved it

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