Now when I open my site with
https:// it says i have a SSL certificate from letsencrypt
but when i open just
http:// it says connection is unsecured, i.e i don't have a SSL certificate.
Please help me make it so that when someone opens http to get redirected to the secured version - httpS
Thank You!
My domain is:
I ran this command:
certbot certonly --non-interactive --agree-tos -m MyEmailHere@gmail.com --webroot -w /usr/local/lsws/MyDomainName.com/html/ -d MyDomainName -d MyDomainName.com
It produced this output:
My web server is (include version): LiteSpeed/1.7.19 Open (BUILD built: Mon Feb 5 23:11:12 UTC 2024)
The operating system my web server runs on is (include version): Ubuntu 22.04.3 LTS
My hosting provider, if applicable, is: Hetzner
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 i don't use control panel
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 1.21.0
The redirect for HTTP is configured in LiteSpeed. It is not an issue with your Let's Encrypt cert. Your best source for advice is probably the LiteSpeed forum. Maybe even this thread there which google found Just search their forum if this thread does not help.
That is expected.
You may need to read about the differences between HTTP and HTTPS [and how to properly secure a website].
In short: HTTP is insecure [and will always be insecure]
HTTPS is not a modification to HTTP.
HTTPS is a replacement to HTTP [and both services can, and usually do, exist within the same system]. As @MikeMcQ suggests, you simply need to redirect all HTTP requests to the new HTTPS service.
No, for a couple reasons. Please don't use '0' as the minute. See this Let's Encrypt FAQ Answer about this. And this Certbot cron recommendation (link here)
This is the other issue. The renew does renew all your domains and it is best to avoid any options on the renew command for this reason.
Instead, you should have re-issued the original command for this domain and added the --deploy-hook to that command. This would update your renewal conf profile for just this cert. The renew command uses those profile settings for each cert so the deploy-hook would run just when renewing that specific cert.
Your renewal conf files are in /etc/letsencrypt/renewal and are shown by
sudo certbot certificates
It is possible to renew a single domain and this is often helpful in testing with the --dry-run option. But, it is not the best practice for routine production renewal. To renew a single cert you use the --cert-name option. See the Certbot docs for details.