How To Force SSL In Joomla

Forcing SSL in Joomla requires editing 2 files. You can do this either using FTP or the cPanel File Manager (click here for a guide on using this tool). Both files are located in the root folder (usually called public_html)

1 - The configuration.php file

Find the line that says $live_site = '';

23f857f5f8bc9bbb95deb4412e315479cf579d65?t=62e9dd77967897882704862474ed68ca

 

Between the quotes, add your domain name, including the ssl portion

cbbe3b4da475d99884cd40c002c5f9b0f4557002?t=30ea1564b524b24d31900b589867d4ae

 

Make sure to save the file once you've done this.

 

2 - The .htaccess file (it's hidden by default, click here for a guide on editing it)

NOTE: By default, the htaccess file in Joomla is named htaccess.txt. To enable this file, rename it to .htaccess

You need to add this code to the top of the file

RewriteEngine On
RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

The page should look like this

c1cb36238709b3247123c685bff4bc0da863e46d?t=7de9cd37cfa690afb4d2520b3d756679

 

Once those 2 things are done, SSL should be forced by default for all pages on your Joomla site.



Did you find this article useful?