Force SSL In Joomla

  Print

How To Force SSL In Joomla

There are two methods which you can utilise to force HTTPS in Joomla - we recommend using the first method and updating it in your Joomla Administration page.


Using Joomla Admin


Step 1 - Login to 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

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 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 ssl portion


cbbe3b4da475d99884cd40c002c5f9b0f4557002?t=30ea1564b524b24d31900b589867d4ae


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



Step 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?  

Related Articles

© Crucial