How to enable SSL for Joomla using .htaccess?

You can enable SSL support in Joomla simply by adding a few lines of code to your main .htaccess file, i.e. the one residing in the public_html directory of your hosting account. If you don't have an .htaccess file, you can simplycreate a new file with cPanel's File Manager.

 

You can open the .htaccess file with the File Manager in cPanel and add the following lines at the top of the file:

 

RewriteEngine on

RewriteCond %{SERVER_PORT} !^443$

RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [QSA,R=301,L]

<IfModule !mod_ssl.c>

Redirect permanent / https://www.yourdomainname.com

 </IfModule>

 

where www.yourdomainname.com should be replaced with your actual domain name. This will force every request to your website to go through SSL.

Joomla is a powerful software that is easy to work with once you have the right host to support you. Before you lose any more time with the wrong host, check out the SiteGround Joomla hosting offer.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to test if jHackGuard is working correctly on your Joomla site?

If you want to be sure that jHackGuard is installed and working correctly on your website, you...

How to remove time stamps from Joomla SEF URLs

Due to an incorrect alias or a non-English character in your category names, Joomla may replace...

How to configure AcyMailing to comply with hostlantern e-mail terms of use?

In order to comply with the SiteGround e-mail Terms of Service you have to configure your...

Joomla caching

The caching mechanism implemented in Joomla is a way to improve the performance and loading speed...

How to extract and restore a Joomla .jpa archive or backup?

Upload your .jpa archive in public_html through your FTP client:...