SSL From Cloudways Not Working [RESOLVED]


#1

Hey guys,

I migrated a site over and set up the ssl that comes with Cloudways as a wildcard.

In the browser it shows the url as https but it also says “Your connection to this site is not fully secure”.

Any ideas how to fix this?

Chris


#2

This usually means that you have elements on the page that are being called using non-HTTPS URLs - referred to as “mixed content”. Often images, but can also be JavaScript, CSS etc too.

You can get a quick idea of what elements are causing the issue by right-clicking an empty spot on the page and select Inspect, then look in the Console for the mixed errors. Or use whynopadlock.com for an external tool.

Was the site under HTTPS at the old location before migrating?

Paul


#3

Yes I had ssl at the last host which was shared.

Everything was working so I’m pretty sure I don’t have any mixed content.

I also noticed that when I type in http://example.com it doesn’t forward to https?

Chris


#4

The possible causes of the error are mixed content, minor certificate errors/mismatches etc.

If you supply the URL, we can have a look. But assuming you don’t have mixed content after the move isn’t the best approach. Better to actually inspect.

For the latter issue, you’ll need to configure the htaccess redirect in the way that is compatible with Cloudways. The code is

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

#5

OK Paul thanks for the help.

Here is the URL: http://financiallifestylesuccess.com/

As for the redirect I trying to figure that out now and hopefully can get it working.

Chris


#6

Literally all your images are loading over HTTP, Chris. Because you appear to have a right-click blocking script in place, you need to use the keyboard shortcut CTRL-SHIFT- I to trigger the Inspect window to see them under the Console tab.

First, make certain the URLs in the WP Settings are both set to HTTPS.

If so and you still have issues, you’ll need to use Better Search Replace plugin to find all instances of http://financiallifestylesuccess.com/ and replace with https://financiallifestylesuccess.com/ in the database (always best to backup the DB first. BFR does also offer a Test Run option to see what will be affected without making any changes.

As far as the HTTPS redirect - you need to replace the old redirect you had with the new code I gave you. Because Cloudways uses NGINX/Apache in a proxy configuration, the redirect has to be written differently using the x-forwarded-proto.

P.


#7

Thanks Paul will give your suggestions a try!

Chris


#8

Marking it as ‘Resolved’ as there is no activity for past 11 days.