Last Updated on April 22, 2021 by Amit

The error “Your connection to site is not fully secure is most often caused by mixed contents. This happens when a mixture of secure and non-secure elements is sent over the secure sever. Chrome browser flags such URLs as insecure and removes the green ssl padlock. The appearance of https:// URL perfix changes from green color to gray in address bar.

Any url that is flagged as insecure by chrome looks something like the one shown in the screenshot above. An insecure URL not only makes your website insecure for visiters but also affects your page rank in google search. So its important to fix it before you get into a big trouble.

How to fix mixed contents issue

Mixed contents issue is when your secure server receives both https and http requests. These requests can be of any form including images , hyperlinks, iframes etc. To fix it open your webpage in an editor and search for elemets that use src and href attributes. If any of the elements on your webpage is linking through http scheme then change it to https . If your webpage is using a resouce linked to an external domain using http scheme ,change it to https too. Do the same for evey linked elements on your webpage.
If you are using wordpress then perhaps you will not be able to open each files manually in your editor. In that case just open your wp-config.php file that is located in your wordpress root folder and Put the following three lines just above the comment line that says “Thats all. Stop editing. Happy blogging ” :

$_SERVER[‘HTTPS’] = ‘on’;

Make sure to replace example.com with your domain.com . These three lines tell your wordpress server to load all resources using a secure URL scheme.

If your domain is accessible by both http and https scheme, then you have redirect your http version to https. In your wordpress htaccess, at the top of other rules you can use the following RewriteRule to redirect your non-ssl requests to ssl .

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://example.com/$1 [L,R=301]

Hope you liked this post. Thanks for reading.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.