In this blog post, assuming you already have a SSL certificate installed, I’m going to show you how to fix SSL errors easily and definitely.
Switching your website from http to https is nowadays a necessity, even if there is no exchange of sensitive information involved on it, because this is a SEO ranking factor and browsers will show that your site is insecure and that may also drive your visitors away.
How to Fix SSL Errors Easily and Definitely!
So you have your SSL certificate installed on your website via the hosting company and http:// redirected to https://. You are expecting everything to work, but it’s not as you see a SSL error on your browser like this.
You can see that there is no padlock showing up despite the site having a valid SSL certificate and it is marked as “Not Secure” in Chrome or any other browser.
When clicking for more info it says, “Your connection to this site is not fully secure,” even though the site is showing up with https:// in the URL.
This is in fact due to some resources on your website like images, java scripts, links, theme or plugin, being pulled with http instead of https.
This can be a real headache to know which of these web elements are causing the problem. If you are curious, you can go to this website to SSL check scan your website for non-secure content.
Knowing what the errors are will not help you that much as it can become very confusing, and I’m going to show you how I did it for several WordPress websites.
When I first switched my WordPress websites to https, I first took the lazy solution, which is installing a plugin like “Easy SSL.” The plugin does a good job for most sites, but I still had to correct errors manually or pay for the Pro version.
Anyways, I got it working, but after updating WordPress or the plugin itself, it was back to square 1 with errors to correct again.
That’s why I took another route, which is very easy to fix SSL errors permanently.
Fix SSL Errors step by step
The first step is to backup your database.
If you are on CloudWays like I do, this is an easy process.
The second step is to change your URL within WordPress in your settings.
You most likely will have http there, so change it to https.
After you do this, this will ask you to login again.
Log in again.
The third step is to install the Better Search Replace plugin and activate it, which I assume you know how to do.
Then, go to the “Tools” section on WordPress and click on “Search & Replace.”
Enter the following:
Search for: http://
Replace with: https://
Then select all tables.
Do not use only http and https in the search and replace fields as this will screw up the links that already are https, I learned that the hard way.
You can test this first by checking the “Run as dry run” to see what needs to be changed, or just click the “Run Search/Replace” button.
All URLs are now https and this should work correctly even after upgrading WordPress.
You can delete the Better Search Replace plugin when you are done.
If you have any cache on your WordPress or Cloudflare, purge them.
Now you can try your pages again to see if the padlock is showing up.
I recommend you visit your main navigation pages to see if they all got the padlock and look at a few links in the content to see if there is no issue, which you won’t have if you followed my instructions.
SSL Certificate and Redirection
This section is in case you don’t have a SSL certificate and wonder how you can get it easily.
After being on a VPS with several WordPress websites, I found that enabling a certificate and redirecting http to https was quite challenging unless you have support doing it for you, and they will not fix your No Padlock issue anyway.
I moved recently to CloudWays, which is a cloud server, and this was very easy to do.
Just enable “Let’s Encrypt” SSL certificates and “Auto Renewal.”
Then enter your domain with www. and without, and any other domains and sub-domains you want associated.
Then enable HTTPS redirection.
I wanted to mention that because this is so much easier than what the other web hosts have.