How To Force SSL In Joomla


In this guide are two methods which you can utilise to force HTTPS in Joomla. Please note that while these steps are generally straightforward, this information is provided as a suggestion and we can't provide detailed support for modifications to a Content Management System. If you require assistance with this, we'd recommend speaking to your website developer to ensure relevance and compatibility with your site.


Using Joomla Admin
Step 1 - Log into your Joomla administrator area.

16af8fe55d8720172509d53b64f8ab746aee1cfc?t=e349fd1cd1df348e32c9d17f334ac10c


Step 2 -
Click on Global Configuration.

34935f9f754c10f894e0162cdff30d3f65cbd367?t=d3f98a9dd8693e31ead7fec3191d24ae


Step 3 - Click on (1) Server, (2) drop down the menu for Force HTTPS, (3) Select Entire Site.


4d35b53b41ff920c577eba8df3781897267e82dc?t=9901755864d59d2db7f575253dc06766

SSL should now be forced for all pages on your Joomla site. You can use the tool Redirect Detective to test whether this has been configured successfully.

Using File Manager
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 document root folder (usually called public_html).

Step 1 - The configuration.php file

Find the line that says $live_site = '';

23f857f5f8bc9bbb95deb4412e315479cf579d65?t=62e9dd77967897882704862474ed68ca


Between the quotes, add your domain name, including the 'https://' portion.

cbbe3b4da475d99884cd40c002c5f9b0f4557002?t=30ea1564b524b24d31900b589867d4ae


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


Step 2 - The .htaccess file

NOTE: By default, the htaccess file in Joomla is named htaccess.txt. To enable this file, rename it to ".htaccess". You can also use this guide to edit it.

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

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


The page should look like this:

c1cb36238709b3247123c685bff4bc0da863e46d?t=7de9cd37cfa690afb4d2520b3d756679


Once these two things are done, SSL should be forced for all pages on your Joomla site. You can use the tool Redirect Detective to test whether this has been configured successfully..


For more information and tutorials on SSL Certificates, see our SSL Guide Repository.
For more tutorials on website development and Content Management System troubleshooting, view our List of CMS Guides.



Did you find this article useful?