Mixed content Warnings & Errormessages

How to track down mixed content or insecure content

What to do when you don’t get the green lock

As a first step, you should check if the mixed content fixer is active on your site. You can see this on the configuration page in settings/ssl. If the plugin can’t see if it’s active, check this article for a manual check.

If the mixed content fixer is active, but you still don’t have the green lock, you have a type of mixed content that can’t be fixed automatically:

  • Http links in stylesheets or javascript files
    Some .css or .js files contain hard coded http links, which will cause mixed content warnings. For example if you use a theme that generates custom css with hardcoded http links, this will cause mixed content warnings.
  • Hot linked images
    If you have embedded an image on your domain, domain-1.com and the URL to that image is domain-2.com, and domain-2 does not have an SSL certificate, this image will be blocked by the browser.
  • http links in your site to javascript files or stylesheets on other domains
    These will get fixed by Really Simple SSL, but again, if the remote domain does not have an SSL certificate, these files can’t get loaded over https.
  • http links in css or js files on other domains
    If the remote files can get loaded over https, but contain hardcoded http links (which happens a lot) mixed content warnings are the result.

These links can be located in theme files, plugins, or maybe in a widget you inserted on your site. Sometimes images are inserted from another website with their url, which won’t work anymore if that url can’t load on SSL.

To find these issues, you might consider buying the Really Simple SSL pro plugin, which scans your entire site for all possible issues in files and database, and creates a list of issues to fix and when possible it offers a “fix” option. If not, you’ll get instructions how to fix it. Besides this, you get added options that improve your security, like HTTP Strict Transport Security, the preload list, a certificate expiration warning option, mixed content fixer for the admin, and more.

If you want to do this manually:

First, check if the mixed content fixer is active.

If it is, you’ll have to track down the urls that were not fixed automatically.

  1. Clear any cache in your browser, by clearing the history
  2. If you have a caching plugin active, clear the cache and check if it has been cleared.

Still getting mixed content warnings? Follow these steps:

Open your site in Google Chrome,

Right click on your website. A drop down will appear, with an option “inspect element”

step-1-inspectelement

When you click this option “inspect element”, part of your browser changes into a development screen:

step-2-development-console

To enter the console, simply click “console”. Then you will see the mixed content warnings, like:

Mixed Content: The page at ‘https://domain.com’ was loaded over HTTPS, but requested an insecure image ‘http://domain.com/…’. This content should also be served over HTTPS.

step3-the-chrome-console

Now we are getting somewhere! In the red characters, you will find some links. These links are the cause of your frustrations. How to fix them depends on your theme, plugins, etc.

First we will check if the problematic link is located in the websource, or in some other file, .js or .css for example. To do this, we go back to the normal website, right click, and now select “view source”

step-4-view-source

If we click “view source”, we now see the html code of the page. Do a search (ctrl F or cmd F) on the insecure link you found in the previous steps.

If the link is not in the source, it is probably located in a .css or .js file, generated by a plugin or your theme. Check all your plugins, resave the options, and do the same with your theme.

To find mixed content in your css or js, you can also download these files from your server, do a search on the file, and replace any http links you might find.

Related Articles

5 Comments

  • Willem

    Thanx Rogier! This worked for me.
    I kept on getting a warning so checked every link and picture (i thought).
    Then read your console tip!

    Great plugin, does the trick.
    Willem (also from Groningen 🙂 )

    • Rogier Lankhorst

      Hi Willem, that’s good to hear!

  • Mark L

    Hi,
    I recently moved my site to SSL and use your plugin to activate it.
    On my site I display external rss feeds from secured and non-secured websites (news agregator). Those feeds from non-secured sources are not displaying images on my secured site and I see these errors in the chrome console:

    Failed to load resource: net::ERR_INSECURE_RESPONSE
    Failed to load resource: net::ERR_CONNECTION_REFUSED
    Failed to load resource: net::ERR_CONNECTION_CLOSED

    Is there anything I can do to display images from http sites on my https site?

    • Rogier Lankhorst

      This is correct behavior. The insecure images won’t get loaded. The only solution is to disable the mixed content fixer for those url’s, but I would advise against that: users would get security warnings on your homepage if insecure images are loaded. So if you are looking to hotlink images from a http domain on your site without users getting mixed content/security warnings: that’s not possible .You have to choose: images, or a green lock.

      • Mark L

        Thanks for this. I wish I know about this before the change.

Leave a Comment