HTTP works but not HTTPS

Hey guys I could really use some help as i’m fairly new to all this. I have installed cert-bot and ran it. It gives me a success message then I test the site and it says the site can’t be reached but the http version works fine. I ran the site through check dns and the results can be found here : https://check-your-website.server-daten.de/?q=lunchmoneybets.com. It shows I have certificates so not quite sure what the problem is. I think it might have something to do with my certificate name not having www. because If I curl https://www.lunchmoneybets.com it says subject name doesn’t match host name but if i curl just https://lunchmoneybets.com it works. Any help would be greatly appreciated!

My domain is:
https://www.lunchmoneybets.com
I ran this command:
sudo certbot --apache
It produced this output:
https://www.lunchmoneybets.com/
My web server is (include version): apache2
The operating system my web server runs on is (include version):
ubuntu 16.04
My hosting provider, if applicable, is:

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):
no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): cerbot 0.31.0

Hi @Modzzz

you have created 5 identical certificates ( https://check-your-website.server-daten.de/?q=lunchmoneybets.com#ct-logs ):

CertSpotter-Id Issuer not before not after Domain names LE-Duplicate next LE
960846694 CN=Let’s Encrypt Authority X3, O=Let’s Encrypt, C=US 2019-06-10 23:40:19 2019-09-08 23:40:19 lunchmoneybets.com - 1 entries duplicate nr. 5 next Letsencrypt certificate: 2019-06-14 21:26:14
960831203 CN=Let’s Encrypt Authority X3, O=Let’s Encrypt, C=US 2019-06-10 23:27:17 2019-09-08 23:27:17 lunchmoneybets.com - 1 entries duplicate nr. 4
955322610 CN=Let’s Encrypt Authority X3, O=Let’s Encrypt, C=US 2019-06-07 21:58:23 2019-09-05 21:58:23 lunchmoneybets.com - 1 entries duplicate nr. 3
955404570 CN=Let’s Encrypt Authority X3, O=Let’s Encrypt, C=US 2019-06-07 21:57:49 2019-09-05 21:57:49 lunchmoneybets.com - 1 entries duplicate nr. 2
955278379 CN=Let’s Encrypt Authority X3, O=Let’s Encrypt, C=US 2019-06-07 21:26:14 2019-09-05 21:26:14 lunchmoneybets.com - 1 entries duplicate nr. 1

But there is only one domain name. You need one certificate with both domain names.

Start with

sudo certbot --apache -d www.lunchmoneybets.com -d lunchmoneybets.com

Your domain is invisible, so it’s not possible to see, if the certificate is used.

Ok thank you! I ran that command and it asked which virtual host file to choose. It only gives me the option of choosing lunchmoneybets.com.conf and lunchmoneybets.com-le-ssl.conf. I tried lunchmoneybets.com.conf and it said “The selected vhost would conflict with other HTTPS VirtualHosts within Apache. Please select another vhost or add ServerNames to your configuration.” but I have bother server names in the .conf files

If you want to use non-www and www with the same content / certificate, you should have one port 80 vHost.

ServerName www.lunchmoneybets.com
ServerAlias lunchmoneybets.com

And no second port 80 vHost. Perhaps remove the wrong port 443 vHost if there is no domain online.

Then start Certbot again.

Ok I got them both in the same certificate but the https is still not working. the http site works fine http://www.lunchmoneybets.com/. Also I have only 1 port 80 vhost and 1 port 443 vhost in my sites enabled. I just deleted my port 443 vhost and reinstalled but I am getting the same problem.

Then recheck your domain to see, what has worked.

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