How to enable Force SSL option in your Joomla site?
Before proceeding with below steps, keep in mind that the domain should have a valid SSL.If you need any help regarding SSL installation, you will need to contact your Hosting for detailed instructions.
Step 1: configure your configuration.php file
- Open your configuration.php file
Find the following line:
var $live_site ='';
Replace with:
var $live_site = 'https://www.your-domain-name.com';
Note :- Add your domain name instead of www.your-domain-name.com.
Then, open your .htaccess file then add the below code to the bottom of the file.
RewriteEngine On
RewriteCond %{HTTPS} OFF
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Step 2: Enable Force SSL option in your Joomla site
You can do it from the Joomla admin panel or Joomla configuration file.
From Joomla admin panel :-
- Go to System >> Global Configuration or simply click the Global Configuration button.
- Under Server tab, go to “Server Settings” section, there are 3 options for Force SSL that you can choose.
- None for SSL will not be enabled in your Joomla site.
- Administrator Only for connections to your administrator will be on HTTPS.
- Entire Site for connections all over your website will be on HTTPS.
You can use Entire Site for the “Force HTTPS” option
- Click on Apply/Save button to reflect the changes.
From Joomla configuration file.
- Open for edit the configuration.php file
- Search for below entry public $force_ssl
- Change public $force_ssl value to 2 to choose “Entire Site“
public $force_ssl = '2';
- To choose “None“
public $force_ssl = '0';
- To choose “Administrator Only“
public $force_ssl = '1';
- Save the changes to the file.
That’s it 🙂 Please cross check it from your end now and let me know if you need any help on this.