If you are searching for how to redirect all https to https in WordPress, this post is going to help you. Recently, I changed all of my WordPress websites from https to https. There are some reasons for redirecting all https to https.
When Google announced HTTPS as a ranking signal, I purchased SSL certificate for all of my website. All of my SSL certificated was PositiveSSL and I purchased it from Namecheap with only $9.00/yr/certificate.
The main reason for using Namecheap is, I am using Namecheap for my domain registrar and hosting. All of my domain purchased from here and those are hosted in Namecheap hosting. As a domain registrar and web hosting company, Namecheap is the best. But, As an SSL registrar, they are not good at all.
Problem Using SSL
After installing SSL certificate on my website, I am facing an issue. Most of the time I was started getting an error “This site can’t be reached error“. And My website slowed down. I contacted Namecheap Support, But they are not able to fix my problem. Then I decided to use my website without SSL certificates. And I started using my website without SSL certificate. It was really good. But, There had an issue also. All of my website link already indexed in google with https. If someone gets my website through the google search, they will get SSL error. That time I thought, This is the time to redirect All HTTPS to HTTP.
Redirect All HTTPS to HTTP
I started searching google how to redirect all HTTPS to HTTP. I found lots of results but most of the results are about HTTP to HTTPS redirect. I searched for WordPress plugins. But Not working. After searching few hours I found a code that able to redirect all HTTPS to HTTP.
I developed a WordPress plugin named “HTTPs to HTTP Redirect“. You can also redirect all of your HTTPs page into HTTP page by using this simple plugin.
This code will redirect all HTTPS request to HTTP request. But, You must have installed SSL certificate. You need to add this code to functions.php file. Go to theme editor and open functions.php file. Scroll down and paste following code at the bottom.
If the code works please press the share button and share with your friends. And if you find any error, go to cpanel and remove the code from functions.php file.