Use always SSL (https://)

To force the loading of a website when the request is without SSL (without https:// in the request) we need to create the file .htaccess in the root directory of the webiste and add this inside this file

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]

Now we just save the file and the website should redirect us to our SSL website.

  • ssl, https, CPanel
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Change PHP version per folder

Available PHP versions in the PHP Selector– php 5.4– php 5.6– php 7.1– php 7.2– php 7.3– php...

Execute CRON commands with different PHP version

Available PHP versions in the PHP Selector– php 5.4– php 5.6– php 7.1– php 7.2– php 7.3– php 7.x...

Migrar/Instalar certificados SSL

Como migrar mi certificado (si uso certificado de CloudFlare) Accedemos a el panel antiguo, en...

Solicitar certificado SSL en CloudFlare

Para solicitar el certificado en CloudFlare lo primero es acceder a CloudFlare y al dominio que...