Configuring your Joomla website to use SSL

joomlaFor some websites, you'll want them to use SSL, so that all the traffic on the site is encrypted.  Particularly important if the site is used for financial transactions.

This article describes how to do this using the Siteground SSL Certificate, using the example of


Before you get started, please note that you need to have the exact sub-domain as a symlink or a folder inside of the primary domain folder (for the SSL).

In order to do that, you can create the symlink by running the following command through SSH in the folder: /home/Addons/ where the domain for the SSL resides.

ln -s /home/Subdomains/ secure

Note that if you are unsure how to create this symlink you can post a new ticket at Siteground and they will do it for you (for other sub-domains you wish to use through the secure connection).

Note, that adding a symlink, does not affect the Akeeba Backup on In other words the symlinked /secure folder is not included when backing up using Akeeba Backup in the primary domain folder.


Joomla websites

Firstly you need to edit the htaccess.txt file in your preferred File Manager.

  1. Browse to the root directory for the website.
  2. Rename the htaccess.txt file to .htaccess.
  3. Open the file for editing.
  4. Add the following content to the top of the file.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Now that the file is .htaccess, you can enable URL rewriting in Joomla. This will remove the index.php from the browsers address bar, and is good SEO practice.

  1. Login to the back-end of Joomla.
  2. Go to System > Global Configuration.
  3. Select the Site tab.
    1. Under SEO settings, enable Use URL rewriting.
  4. Select the Server tab.
    1. For the Force SSL option, choose Entire site.


Moodle sites

  1. Navigate to the config.php file in the File manager.
  2. Look for the line 17 (on default config files) that shows:
$CFG->wwwroot = '';

Change the https:// to https:// like the following:

$CFG->wwwroot = '';

Next, Set up a redirect in your .htaccess file, by placing the following code to force the https:// redirect.

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




Thanks for visiting.