How to redirect your website to HTTPS Print

  • HTTPS
  • 2

Applies to: This article applies to SSL and security tasks on OneNet Servers. Standard hosting plans use free Let's Encrypt by default unless you buy a Premium SSL product.

If you have installed an SSL Certificate on your hosting account and wish to force all your web traffic to the https protocol, you need to copy and paste the following code into your .htaccess file. You will find the .htaccess file in the public_html directory of your web hosting cPanel.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Was this answer helpful?

« Back