TheDutchMarketers.com
Share
http to https wordpress

How To Migrate From Http To Https WordPress

Share

In this post I would like to guide you through all the necessary steps to move your wordpress website from http to https.

I assume you've installed your SSL certificate successfully and verified the installation on SSL Labs

If you are still paying money for your SSL cerificates, I would recommend you look for a different host.

Siteground is an excellent hosting company that offers free Letsencrypt certificates that can be installed in one click and have http/2 enabled. We use Siteground for a couple of years now and we will never switch host again...

Needless to say we are huge fans 🙂

Reasons Why You Need Https

  • Security: https is of course more secure than http
  • SEO: Google prefers secure sites and may want to reward you for that. As Google just announced, next year Chrome will start showing more visible ⚠“Not Secure” warnings for sites transmitting passwords and credit card information via non-secure HTTP.
  • Speed: Https + http/2 (Your host should support that) is way faster than http + http/1
  • Authority: The green padlock shows trust and authority to your visitors

Steps To Implement Https On Your WordPress Site

The easiest way would be to install the wordpress https plugin really simple ssl. If you install this plugin you can go directly to step 4 of this guide

However there may be reasons to do it without using a plugin and I will update the steps below

1) Update WordPress Url's

- Go to your settings/general in wordpress and change your wordpress address url and site address url to : https:www.domain.com

Update WordPress Url's

2) Update All Other Url's As Well

- Make sure you backup your website first

- Install the Blue Velvet plugin and change all file url's from http to https. Go to tools/update url's

blue velvet plugin

3) Force Https In .htaccess File

- You want to exclusively use https on your wordpress site right? Then you need to 301 redirect everything to https using the following codes.

For Apache

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

For Nginx

server {
listen 80;
server_name domain.com www.domain.com;
return 301 https://domain.com$request_uri;
}

Go to your file manager in cpanel and make sure you tick the box "show hidden files" and find your .htaccess file.

file manager cpanel

Right click on the .htaccess file and click edit and add the code right above the line: # BEGIN WordPress

4) Update Your Google Webmaster Tools And GA Profile

Because you have updated all your url's you need to add your new https url to your webmaster tools in order to get new data for your website and resubmit your sitemap.

In Google analytics you need to change your profile url to https as well

5) Check Your Pages For Green Padlock

Always do a final check on all your pages and see if all the content is loaded securely and if that is the case you should see the green padlock.

green padlock

If you don't see the green padlock then you need to verify which content on that page is loaded insecurely. You can use this tool to see which content is loaded insecurely.

6) Secure Your Headers

This is an additional step I always take to further secure my headers. Not many people know this or implement this but I would definitely recommend you do this as well.

Go to https://securityheaders.io/ and see which grade you have. This will probably a pretty low grade...

In order to improve that grade and make your https header more secure you need to add the following code to your .htaccess file

Header always set x-xss-protection "1; mode=block"


Header always set x-frame-options "SAMEORIGIN"


Header always set X-Content-Type-Options "nosniff"

I am pretty sure your grade has improved to "B" or at least higher than it was before 🙂

This is all it takes to implement https on your wordpress site. I hope you've found this usefull and if you have issues then please comment below and I will try to help out

About the Author Gio

Hi and welcome to our website! My name is Gio and yes I am from The Netherlands :). I am working online for 9 years now and I would like to share my experience on my blog. I am a single dad and love spending time with her.

Leave a Comment: