Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124

In today’s web environment, a secure connection is no longer optional for a Joomla site. A valid SSL/TLS certificate protects visitor data, improves search‑engine rankings, and eliminates browser warnings that can drive traffic away. Following the official Joomla documentation as our reference, in this guide we walk through every step of a joomla ssl setup, from obtaining a free certificate to configuring Joomla and the web server, and we finish with troubleshooting tips and a short FAQ.
The terms SSL and TLS are used interchangeably in everyday conversation, but they refer to different protocol generations. SSL (Secure Sockets Layer) was developed by Netscape in the mid-1990s. After several vulnerabilities were found, the protocol was replaced by TLS (Transport Layer Security).
When we say “install an SSL certificate” on a Joomla site, we really mean installing a TLS certificate. The certificate is a digital document that binds a public key to your domain name. The TLS protocol then uses that certificate to establish an encrypted connection between the browser and your server.
Before you start your joomla ssl setup, you need to pick the right certificate type. Here is a quick comparison:
| Type | Covers | Best For | Cost |
|---|---|---|---|
| Single-Domain | One domain (e.g., example.com) |
Simple Joomla sites with no subdomains | Free (Let’s Encrypt) or $10-50/year |
| Wildcard | All first-level subdomains (e.g., *.example.com) |
Joomla sites with subdomains like blog, shop, or staging | $50-200/year (free via Let’s Encrypt DNS validation) |
| Multi-Domain (SAN) | Multiple distinct domains | Agencies managing several Joomla installations | $100-300/year |
For most Joomla site owners, a single-domain certificate from Let’s Encrypt is the practical choice. If you plan to add subdomains later, go with a wildcard certificate. The hosting providers we reviewed in our Best Joomla Hosting guide all support free Let’s Encrypt certificates.
.htaccess file.Many hosts integrate Let’s Encrypt directly into cPanel. Below is a typical workflow; adjust the exact wording to match your control panel.
example.com and www.example.com.If your host does not provide a one‑click installer, you can use a tool like Certbot on a VPS. The essential command for Apache looks like:
sudo certbot --apache -d example.com -d www.example.com
After the certificate is installed, you will have three files (or their equivalents) on the server:
.crt).key).ca-bundle)configuration.phpJoomla stores the base URL and SSL settings in the configuration.php file located in the root of your site. We need to tell Joomla that the site will be accessed via HTTPS.
configuration.php with your preferred editor (cPanel File Manager, FTP, or SSH).$live_site. If it is empty, you can leave it as is; Joomla will use the current request URL. However, for forced HTTPS it is safer to set it explicitly:$live_site = 'https://example.com';
Replace example.com with your own domain.
$force_ssl variable. Joomla offers three options:| Value | Description |
|---|---|
| 0 | Do not enforce SSL. |
| 1 | Force SSL only for the admin area. |
| 2 | Force SSL for the entire site (frontend + backend). |
Set the value to 2 if you want all traffic to use HTTPS:
$force_ssl = 2;
Save the file and close the editor.
Joomla also provides a graphical option to enable SSL. This method works in conjunction with the changes made in configuration.php and is useful for double‑checking the setting.
/administrator).2).When you save, Joomla writes the same $force_ssl = 2; line into configuration.php. If you already edited the file manually, the UI will simply reflect the current setting.
Even with Joomla’s internal setting, some visitors may still reach the HTTP version directly (e.g., via an old bookmark). Adding a redirect in .htaccess guarantees that every request is sent to HTTPS.
.htaccess file in the Joomla root. If you only see htaccess.txt, rename it to .htaccess.RewriteEngine On line:# BEGIN Joomla SSL Redirect
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# END Joomla SSL Redirect
Explanation:
RewriteCond %{HTTPS} !=on checks whether the request is not already using HTTPS.RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] redirects the request to the same host and URI, but with the https:// scheme. The 301 status tells browsers and search engines that the change is permanent.Save the file and close the editor.
After completing the configuration, verify that the site loads securely.
http://example.com. The address bar should automatically change to https://example.com and display a padlock.| Symptom | Possible Cause | Fix |
|---|---|---|
| Browser shows “Your connection is not private” | Certificate not installed correctly or domain mismatch | Re‑install the certificate, ensure the ServerName matches the domain, and verify the certificate chain with SSL Labs. |
| Mixed‑content warnings appear | Resources (images, scripts, CSS) are loaded via http:// |
Search the site for “http://” URLs and replace them with protocol‑relative (//example.com) or absolute HTTPS URLs. Joomla extensions may need updates. |
| Redirect loop (too many redirects) | Both Joomla and .htaccess are forcing HTTPS, causing a loop when the server already redirects | Disable one of the mechanisms. If your host already forces HTTPS at the server level, set $force_ssl = 0 in configuration.php and keep the .htaccess rule. |
| 404 errors after redirect | RewriteBase is set incorrectly in .htaccess | Open .htaccess and adjust the RewriteBase line to match the Joomla sub‑folder (e.g., RewriteBase /joomla/). |
| Admin login fails after enabling SSL | Session cookie path still points to HTTP | In Global Configuration → System → Cookie Settings, ensure the cookie domain is blank and the cookie path is /. Clear browser cache and try again. |
http:// URLs to https://.Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" to your .htaccess after confirming everything works. This tells browsers to always use HTTPS for your domain.No. Let’s Encrypt provides a free, trusted certificate that works with Joomla out of the box. Paid certificates may offer extended validation or warranty, but they are not required for basic HTTPS.
“Site” forces HTTPS for every public page, while “Administrator” only secures the back‑end login area. For full protection and SEO benefits, choose “Site”.
Search the entire site for URLs that start with http://. Replace them with https:// or protocol‑relative URLs. Also check any custom modules, plugins, or template files that may embed external resources.
Yes. The certificate must cover the sub‑domain (e.g., blog.example.com). Let’s Encrypt can issue certificates for sub‑domains automatically when you select them in the control panel.
Visit the site in a private browser window and confirm the padlock appears. Use Qualys SSL Labs for a detailed report. Finally, open the browser console and ensure no mixed‑content messages are shown.
With HTTPS active, your Joomla site is now more secure, trusted, and search‑engine friendly. Consider reviewing our other security resources, such as Joomla Security: 15 Proven Tips to Protect Your Site, and keep your site up to date.
After enabling SSL, you may find that some internal links, images, and module content still reference http:// URLs. These are stored in the Joomla database and need to be updated to prevent mixed-content warnings.
Connect to your database through phpMyAdmin, Adminer, or the MySQL command line. Run these queries (replace example.com with your domain and jos_ with your table prefix):
-- Update article content
UPDATE jos_content SET introtext = REPLACE(introtext, 'http://example.com', 'https://example.com');
UPDATE jos_content SET fulltext = REPLACE(fulltext, 'http://example.com', 'https://example.com');
-- Update custom module content
UPDATE jos_modules SET content = REPLACE(content, 'http://example.com', 'https://example.com');
-- Update menu item links
UPDATE jos_menu SET link = REPLACE(link, 'http://example.com', 'https://example.com');
-- Update category descriptions
UPDATE jos_categories SET description = REPLACE(description, 'http://example.com', 'https://example.com');
Important: Always back up your database before running SQL queries directly. A single typo can break your site.
After running these queries, clear the Joomla cache from System → Clear Cache and verify that the pages load without mixed-content warnings.
Switching from HTTP to HTTPS is essentially a site migration in the eyes of search engines. If you skip a few steps, you may lose rankings temporarily. Here is what to do:
Joomla generates canonical tags automatically based on the site URL. Once you set $live_site = 'https://example.com' in configuration.php, all canonical tags should point to HTTPS. Verify this by viewing the page source and looking for <link rel="canonical" href="https://...">. If you use an SEO extension, double-check its settings as well. For more details, see our Joomla SEO-Friendly URLs: Configuration Guide.
If you use an XML sitemap extension (such as OSMap or JSitemap), regenerate the sitemap after the migration. All URLs in the sitemap must use https://. Submit the updated sitemap in Google Search Console.
Google treats http://example.com and https://example.com as separate properties. Add the HTTPS version in Search Console (or use Domain-level verification to cover both). You can also set the preferred version using the Settings → Change of Address tool.
After enabling both Joomla’s Force HTTPS and the .htaccess redirect, test a few URLs to confirm there is only one redirect (HTTP → HTTPS), not two or three. Redirect chains slow down crawling and dilute link equity. Use a tool like Screaming Frog or the browser’s Network tab (F12) to inspect redirect hops.
| Symptom | Possible Cause | Fix |
|---|---|---|
| Browser shows “Your connection is not private” | Certificate not installed correctly or domain mismatch | Re‑install the certificate, ensure the ServerName matches the domain, and verify the certificate chain with SSL Labs. |
| Mixed‑content warnings appear | Resources (images, scripts, CSS) are loaded via http://. See MDN’s mixed content guide for details |
Search the site for “http://” URLs and replace them with protocol‑relative (//example.com) or absolute HTTPS URLs. Joomla extensions may need updates. |
| Redirect loop (too many redirects) | Both Joomla and .htaccess are forcing HTTPS, causing a loop when the server already redirects | Disable one of the mechanisms. If your host already forces HTTPS at the server level, set $force_ssl = 0 in configuration.php and keep the .htaccess rule. |
| 404 errors after redirect | RewriteBase is set incorrectly in .htaccess | Open .htaccess and adjust the RewriteBase line to match the Joomla sub‑folder (e.g., RewriteBase /joomla/). |
| Admin login fails after enabling SSL | Session cookie path still points to HTTP | In Global Configuration → System → Cookie Settings, ensure the cookie domain is blank and the cookie path is /. Clear browser cache and try again. |
| SSL certificate expired | Let’s Encrypt certificates expire every 90 days | Enable auto-renewal in your hosting panel or set up a cron job: certbot renew --quiet |
| ERR_SSL_VERSION_OR_CIPHER_MISMATCH | Server is using outdated SSL/TLS protocols | Update your Apache or Nginx configuration to disable SSL 3.0, TLS 1.0, and TLS 1.1. Use only TLS 1.2 and 1.3. |
An SSL certificate encrypts the connection, but it does not protect against all attacks. We recommend adding these HTTP security headers to your .htaccess file once HTTPS is working correctly:
# HSTS - Tell browsers to always use HTTPS
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
# Prevent clickjacking
Header always set X-Frame-Options "SAMEORIGIN"
# Block MIME-type sniffing
Header always set X-Content-Type-Options "nosniff"
# Basic Content Security Policy
Header always set Content-Security-Policy "upgrade-insecure-requests"
# Referrer Policy
Header always set Referrer-Policy "strict-origin-when-cross-origin"
The upgrade-insecure-requests directive in the Content Security Policy is especially useful during an SSL migration. It tells browsers to automatically request HTTPS versions of any HTTP resources on the page, which reduces mixed-content warnings without requiring you to find and replace every URL manually.
For a deeper look at Joomla security practices, read our guide on Joomla Security: 15 Proven Tips to Protect Your Site.
http:// URLs to https://.Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" to your .htaccess after confirming everything works. This tells browsers to always use HTTPS for your domain.No. Let’s Encrypt provides a free, trusted certificate that works with Joomla out of the box. Paid certificates may offer extended validation or warranty, but they are not required for basic HTTPS.
“Site” forces HTTPS for every public page, while “Administrator” only secures the back‑end login area. For full protection and SEO benefits, choose “Site”.
Search the entire site for URLs that start with http://. Replace them with https:// or protocol‑relative URLs. Also check any custom modules, plugins, or template files that may embed external resources.
Yes. The certificate must cover the sub‑domain (e.g., blog.example.com). Let’s Encrypt can issue certificates for sub‑domains automatically when you select them in the control panel.
Visit the site in a private browser window and confirm the padlock appears. Use Qualys SSL Labs for a detailed report. Finally, open the browser console and ensure no mixed‑content messages are shown.
With HTTPS active, your Joomla site is now more secure, trusted, and search‑engine friendly. Consider reviewing our other security resources, such as Joomla Security: 15 Proven Tips to Protect Your Site, and keep your site up to date.