At times when you install an SSL certificate on your website, the website disappoints and doesn’t show the anticipated Green Padlock. This may occur in some pages of the website while others will display the Green Padlock as expected. The website however will not warn that it is completely insecure; it will only display a notice that some parts of the page are not secure.
The reason this happens is because, some of the media/posts in the particular pages have a relative URL that uses HTTP instead of HTTPS. The images are thus fetched for display using the insecure HTTP protocol.
Some of these links can be seen from your browser. To view such links, click on information icon near HTTPS then click the More symbol as shown below.
Then Click on More Information>>>Media. When you look at the links displayed closely, you will see one or two of the links starting with http:// instead of https://. Such links are responsible for the missing green padlock.
So, how do we remove that?
The general idea is to replace all http:// appearances with https:// . You can search your posts and media one by one making the change, or you can go to your database tables replacing the links one by one until finish -if you have the time and energy. The alternative however, is far much smarter. Use a Plug-in to do this replacement!
In comes Better Search Replace plug-in.
- To remove that, log in to your WordPress Dashboard, install and activate a plug-in called, Better Search Replace by Delicious Brains. After that, access the plug-in by going to Tools>>>Better Search Replace.
- Once loaded, in the Search for field, type: http:// and in the Replace With field, type https://
- Select all relevant tables in the Select tables field
- Uncheck the Run as dry run? If this remains checked, no changes will be made to the database.
- Then click Run Search/Replace.
All the http:// links will be replace d to HTTPS:// and a report will be displayed on how many occurrences of the http:// were found and how many were changed. The Green Padlock should now appear without the notice that some parts may be insecure.