Redirect HTTP to HTPS

Lately, more and more global sites use SSL encryption (HTTPS) to secure their connections. For this, after an SSL certificate is installed, the domain to use the HTTPS protocol requires certain changes depending on the platform used. Below we indicate the steps required for some of the commonly used platforms.


Method 1: Setup SSL/HTTPS in WordPress Using a Plugin

This method is easier and is recommended for beginners. First, you need to install and activate the Really Simple SSL plugin. 
Upon activation, you need to visit Settings » SSL page. The plugin will automatically detect your SSL certificate, and it will set up your WordPress site to use HTTPs.

The plugin will take care of everything including the mixed content errors. Here’s what the plugin does behind the scenes:

Check SSL certificate
Set WordPress to use https in URLs
Set up redirects from HTTP to HTTPs
Look for URLs in your content still loading from insecure HTTP sources and attempt to fix them.

To check he tutorial regarding the .htaccess edit please go here

Method 2: Setup SSL/HTTPS in WordPress Manually

This method requires you to troubleshoot issues manually and edit WordPress files. However this is a permanent and more performance optimized solution.
First, you need to visit Settings » General page. From here you need to update your WordPress and site URL address fields by replacing http with https.

Don’t forget to click on the ‘Save changes’ button to store your settings. Once the settings are saved, WordPress will log you out, and you will be asked to re-login.
Next, you need to set up WordPress redirects from HTTP to HTTPS by adding the following code to your .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

To find out how to edit the .htaccess file please see:

If you want to force SSL and HTTPS on your WordPress admin area or login pages, then you need to configure SSL in the wp-config.php file.
Simply add the following code in your wp-config.php file:

define('FORCE_SSL_ADMIN', true);

Once you do this, your website is now fully setup to use SSL / HTTPS, but you will still encounter mixed content errors.

These errors are caused by sources (images, scripts, or stylesheets) that are still loading using the insecure HTTP protocol in the URLs. If that is the case, then you will not be able to see a secure padlock icon in your website’s address bar.


After installing the SSL certificate for the site to use HTTPS, you need to access System >> Global Configuration. Here go to the Server tab and in the dropdown menu for Force HTTPS select Entire Site and save the changes.

If a yellow notification occurs, it is caused by mixed content, and you will need to ask for the help of a developer to check the scripts of the site.


To redirect to SSL, you'll need to edit the .htaccess file from the root of the site and add the following lines:

RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

To find out how to edit the .htaccess file please see:


In the back-end, go to System >> Configuration >> General >> Web and select Yes for "use secure url frontend".

Add the bellow code to the .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

To find out how to edit the .htaccess file please see:


This platform has an intuitive web interface and all you have to do is to browse the back-end section of the Preferences >> General and under Enable SSL and Enable SSL on all pages select Yes.

  • 139 Users Found This Useful
Was this answer helpful?

Related Articles

What is the SSL certificate ?

SSL certificates are used to create an encrypted channel between the client and the server....

Can I use a SSL certificate for multiple domains?

An SSL certificate can be installed on a single domain. More sophisticated SSL certificates are...