I have a self hosted CentOS 7 server with apache and wordpress.
Everything works and it’s set up to work without www so http://mydomain.com
On my dns i set up a CNAME just to be sure so www.mydomain.com redirect to mydomain.com
today i ran (WRONG because of www)
./letsencrypt-auto --apache -d www.mydomain.com
and select “2” to automatic redirect all traffic to https
and i start receive SSL_ERROR_BAD_CERT_DOMAIN trying to visit my website
when i noticed the mistake i run again the correct command
./letsencrypt-auto --apache -d mydomain.com
without www and tried to revoke and delete the first certificate with the www
now i’m in this situation:
http://mydomain.com redirect to https://mydomain.com and works!
http://www.mydomain.com redirect to https://www.mydomain.com and DO NOT WORK
https://www.mydomain.com DO NOT WORK
(DO NOT WORK means I receive certificate error, with a “continue anyway” i can see website)
Best way to solve this? I don’t wanna destroy server with a wrong command and I’m not an expert so please explain me a bit how to move and where to check