SSL only working when using www., not without

Hi!

Followed this guide for installing an SSL certificate on Amazon Lightsail:

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress#complete-the-prerequisites-lets-encrypt-wordpress

When I access the website on https://www.sesos.xyz everything works perfectly.
When I access the website on https://sesos.xyz I cannot access the server.

When running sudo certbot certificates it produces this output:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
  Certificate Name: sesos.xyz
    Domains: sesos.xyz *.sesos.xyz
    Expiry Date: 2020-03-22 19:17:46+00:00 (VALID: 89 days)
    Certificate Path: /etc/letsencrypt/live/sesos.xyz/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/sesos.xyz/privkey.pem
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

My domain is sesos.xyz

My web server is Apache, just installed yesterday.

The operating system my web server runs on is Linux.

I can login to a root shell on my machine: yes.

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

Thankful for all help!

1 Like

Hi,

Can you please check if you have entered A address (IP Address) for your root domain?
P.S. Check in your route53.

Just like your wildcard certificate, inputting a wildcard in your route53 DNS doesn’t cover the root domain itself, so you still need to add a entry for your root domain.

Thank you

1 Like

Would this be correct?

A-records

I’ve just added the A record at the top, maybe that will help.

1 Like

That did it. Thanks for your help.

Will this auto-renew?

1 Like

It depends, did you use automated plugin with your DNS API? Or did you use manual (and manually input txt record) when you request that certificate?

1 Like

I manually inputted txt records. I followed exactly the guide in the link above! In the command for certbot there was also something including dns though?

1 Like

Hi,

This means it will not renew automatically, since manual (the plugin) doesn't support renew without any scripts.

However, certbot does have a DNS plugin called route53, which can be found here https://github.com/certbot/certbot/blob/master/certbot-dns-route53/README.md, you can try to follow the links and configure the plugin. Then you might need to reissue / reconfig the certificate to use DNS plugin instead of the manual.

Thank you

1 Like

Happy anniversary @stevenzhu :slight_smile:
YUM! CAKE!

2 Likes

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