How to force your website to use SSL?

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.
  • htacces, website, HTTPS, redirect website to use htaccess, redirect, How do I force my website to use SSL| A guide for Beginners, How do I force my website to use SSL| cPanel Documentation, How do I force my website to use SSL| Easy Steps, How do I force my website to use SSL| Find here, How do I force my website to use SSL| FIXED, How do I force my website to use SSL| Important, How do I force my website to use SSL| htaccess codes, How do I force my website to use SSL| REDIRECT TO SSL, How do I force my website to use SSL| SOLVED, How do I force my website to use SSL| Web Hosting Tutorials, How do I force my website to use SSL| KnowledgeBase, How do I force my website to use SSL| Learning Tutorials
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Install WordPress in Sub-Directory?

Login to cPanel. Select Softaculous Apps Installer from Software section. Select WordPress...

How to Restore Backups Using JetBackup 4 in cPanel?

Login to cPanel and get inside JetBackups section. Here, you will find multiple features which...

How to Suspend Outgoing Emails of a cPanel Account as WHM Reseller?

To manage the bulk mailing that occurred from a cPanel account hosted within your WHM Reseller,...

How Can You Create/Install WordPress On Sub-Domains?

#1. Create a subdomain of your main domain Log into your cPanel and go to the Subdomains...

How to disallow a particular directory from being crawled by Google?

Login to your cPanel Go inside File Manager Click on public_html Create a robots.txt file....