How can I force HTTPS in my website?

How can I force HTTPS in my website?

Written by Crioshavyn Support
Last update: Monday, Mar 09, 2020
  1. Navigate to your desired website in CyberPanel.

  2. Then open the management dashboard of that website.

  3. Scroll down to File Manager. (It will open in another tab)

  4. Double click on public_html

  5. Locate .htaccess

  6. Right click on .htaccess

  7. Click on Edit

  8. Wait for the screen to load your .htaccess, it should look like this:


  9. Simply add these 3 lines in before the line: # BEGIN LSCACHE in .htaccess file:

RewriteCond %{HTTPS} !on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{SERVERNAME}%{REQUESTURI} [R,L]Remember to click on Save Changes.
  1. Save Changes.

  2. Close the Chrome tab.

  3. In your main CyberPanel dashboard: Server > Server Status > LiteSpeed Status

  4. Reboot LiteSpeed.

  5. Wait for it to indicate that it has been successfully rebooted, i.e. Action Successful.

  6. Clear your browser's cache.

General Troubleshooting

For simple troubleshooting without the need to contact technical support.

15 articles in this category.
Written by Crioshavyn Support.