How to fix “Your connection to this site not fully secure” mixed contents SSL error

How to fix “Your connection to this site not fully secure” mixed contents SSL error

Your connection to this site is not fully secure error

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.

Your connection to this site is not fully secure error

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 ” :

define(‘WP_HOME’,’https://example.com’);
define(‘WP_SITEURL’,’https://example.com’);
$_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.

Tags:

2 Responses

  1. Neha says:

    Interesting. Good information you shared . Thanks.

  2. waanao says:

    very nice information

Leave a Reply

Your email address will not be published. Required fields are marked *