LetsEncrypt SSL on Hostinger shared hosting
In this post:
This is the cheapest (costs are only effort and time - the certificate is free) way to install multiple LetsEncrypt SSL certificates on a Hostinger shared hosting plan.
NOTE: the downside is that this process needs to be repeated every 90 days.
Create a hosting subdomain
In hPanel, under Hosting > Domains > Subdomains, create a new subdomain.
Generate a new SSL cert
On an Internet connected Linux box issue the following:
HOST="subdomain.domain"
sudo certbot certonly -d $HOST --manual
which will generate something like
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Create a file containing just this data:
YXY3nxak9Yeu2SfH2mtYQyhqipYxF5Ho4Lc63f7HHJA....
And make it available on your web server at this URL:
http://wp-scratch.titbits.tech/.well-known/acme-challenge/YXY3nxak9Yeu2S....
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
On the Hostinger shared hosting server, login via SSH and create the necessary subdirectory structure and paste the contents in the file as directed before switching back to the first Linux box, and pressing ENTER to continue to the verification step.
Once verified, the following or similar will be displayed:
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/XXXXXXXXXXXXXXXXXX/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/XXXXXXXXXXXXXXXXXX/privkey.pem
Your cert will expire on 2022-01-11. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Get and note the contents of the following files (actually symlinks):
/etc/letsencrypt/live/$HOST/cert.pem
/etc/letsencrypt/live/$HOST/privkey.pem
Install the certificate and key in hPanel
In the hosting section of the hPanel, go to the management section for the domain, and under Advanced > SSL, select the [Import SSL] tab.
Select the subdomain and copy in the contents of the cert.pem
and privkey.pem
files as required.
And finally click [Install SSL].
Success or failure will be reported.