You can easily force your website to use SSL by adding HTTPS redirection. This can be done in one of the following ways.

#1. By adding code in .htaccess file

  • Login to cPanel, get inside File Manager section.
  • Go inside domain directory and then search for .htaccess file. You can go through the tutorial to find .htaccess file.
  • Right click over the file and then Edit.
  • Enter the given code in the file and Save Changes.
RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Refer to the tutorial to learn about the detailed procedure.

#2. From Cloudflare

  • Login to CloudFlare account.
  • Select the domain for which you want to force HTTPS redirection.
  • Select Rules and then Page Rules in left panel list.
  • Click over Create Page Rule. You will be directed to next page.
  • On the next page, enter your website URL and then select Always Use HTTPS in the Settings section.
  • Save and Deploy Page Rule. https://prnt.sc/H4qT5XFlfOqy
To learn more about the topic, visit our Blog and the video tutorial.
Was this answer helpful? 0 Users Found This Useful (0 Votes)