How to Move or Redirect WordPress Blog / Website to HTTPS

how to redirect wordpress to https
Google announced HTTPS as a ranking signal in 2014. And since then many websites moved to HTTPS.

Lets understand about this re-direction slightly more in detail and then we will talk about how it can be done.

This is a permanent 301 redirection meaning you will be moving your website permanently to https version of your website. Example: to

You must also ensure your other version of your urls would also automatically redirects to final https version of your URL.

Before you get started, backup your entire site and also database.

Step 1:

Ensure SSL is successfully installed on your domain. You can check with your hosting provider about this. You can test this by loading a simple test html file in your root domain. Example: Just create a simple test.html file and load it on your server and then try and locate that file in browser like: If you do not get any warning then you can ensure SSL is working fine in your domain and you can move to next step. Note: You might need to check your .htaccess file to ensure it will allow you to load https version of your URL.

Step 2:

Go to your WordPress admin and load general settings page and change WordPress Address (URL) and Site Address (URL) to https version.

Once you will save changes, it will redirect to login page again with https version.


Step 3:

Go to your WorPress installation folder and apply required changes in .htaccess file.

Lets say if you have WordPress installed in /blog folder then your .htaccess may look like:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
# END WordPress

In this file you need to add required code to do permanent redirection to https version of your website.

Step 4:

Find and replace http: version of your URL to https version of your URL. This change need to be done in entire database.

Note: you need to change only your URL not the third party links.

You can use tool or your may download entire database and do find and replace in text editor.


If this doesn’t work then you can restore your backup and understand these steps in detail before you attempt again.

Hope this will be useful, if you got any question, just comment below.

Written By:

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.