SSL is required for websites nowadays as it always plays a role in SEO. Many internet companies provide SSL but they charge for it. but if you don’t want to purchase it you can still use it for free from some websites like.
https://www.sslforfree.com/
https://letsencrypt.org/
https://ssl.comodo.com/free-ssl-certificate.php
https://cloudflare.com
These are some website which provides free SSL for your website the duration of certificate stays 3 months in case of above three links and 1 year if you go with Cloudflare.
Now, here we will see how https://www.sslforfree.com/ works for setting free SSL for your website.
Go to https://www.sslforfree.com/ and enter your domain name .
Now select anyone domain verification technique you like
I am going with manual verification right now
Now here download both files they mentioned and just upload it in your domain directory
Path www.website.com/.well-known/acme-challenge/ this is path
upload both downloaded files here
after uploading, click on download ssl certificate button and you will see this screen
Now to go SSL section in your server / cpanel and select your domain.
upload CRT, KEY AND CABUNDLE here and click on save.
Now if you are using wordpress you have to install one plugin.
https://wordpress.org/plugins/really-simple-ssl/
this plugin will do everything required and it will convert everything from http to https
if you want to do it manually just update your htaccess file by adding this code
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]