If you have a Domain which doesn’t have SSL certification. You can set up SSL certification for free.
In short what we will be doing is
- Using zerossl site we will generate SSL cert files.
- Using cPanel Dashboard we will activate SSL.
- Finally we will add redirect logic to move from http to https.
Note: I have tried this on GoDaddy web hosting using cPanel.
- Goto this site : https://zerossl.com/
- Click on Online Tools button => FREE SSL Certificate Wizard => Start Button.
- Something like this
- In Detail Tab entry your Domain in Box saying “Domains (ONLY if you have no CSR)“
- eg: mysite.com, www.mysite.com
- Also tick Accept ZeroSSL TOS and Accept Let’s Encrypt SA (pdf) given at bottom.
- Refer below image.
- Click Next
- Your Domain CRT is generated in right Text Box. Just click Download Button to keep a copy of it.
- Click Next
- Your Account key will be Generated on Left box
- Again Download it
- Click next
- Now you will see Verification Tab. It contain 2 files related to your domain.
- Download both files.
- In order to verify that you are owner of site for which you are generating SSL key. You need to place both files in “webroot/.well-known/acme-challenge/”
- In my case public_html/.well-known/acme-challenge/
- Now we need to access domain folder and upload above files using cPanel.
- Go to your Domain cPanel Dashboard.
- Click File Manager
- Note that in Dialog “Show Hidden Files (dotfiles).” is checked else you will not see hidden files.
- Click Go
- Move inside public_html
- Create folder with name “.well-known“
- Move in .well-known
- Create another folder with name “acme-challenge“
- Move in acme-challenge
- Now upload the files which you have downloaded from Verification Tab.
- After uploading both files
- Goto zerossl tab and click the file link. It will open another tab with the file content which you just uploaded. Refer below image.
- If you can see the text. You have uploaded files correctly.
- Hit Next in zerossl tab.
- You will see “Your Certificate is ready “
- Scroll Down you will have your CRT and PRIVATE KEY. Download it for a Backup.
- Now since we have got our SSL cert files. Next step is configure SSL.
- Goto cpanel Dashboard
- Scroll Down to Security => Click SSL/TLS. Refer below image.
- In this window you will see various options to configure SSL. Click last option “Manage SSL sites.“
- In next screen select the Domain for which you are adding SSL
- In Certificate: (CRT)
- Copy text from Wizard first text box.
- Paste it in SSL CRT textbox.
- It might say invalid as there are 2 keys into it.
- Something like this
- Cut the last Certificate text and paste it in Certificate Authority Bundle: (CABUNDLE) textbox.
- Now copy the Private Key from zerossl tab and paste it in Private Key (KEY) textbox.
- Hit Install Certificate
- If every thing went well you will see success Msg.
- Verify that SSL is installed.
- Try https://mysite.com in new tab and it should work.
- Now try http://mysite.com also in new tab.
- It works but its not secure or https
- So we need to configure redirect from http to https
- Goto cPanel File Manager.
- Move to public_html folder.
- Inside public_html look for .htaccess if it exist, edit it
- Else create new file with “.htaccess”
- Inside .htaccess add in last these lines
- Save file.
- Now try http://mysite.com it should redirect to https://mysite.com
Bingo. You have just installed SSL Cert for Free…
Note: In case, installation doesn’t work for you or you didn’t understand steps you can refer a sample installation video