How to fix mixed content warnings

Why a site on HTTPS still shows ‘not fully secure’, how to find the insecure images, scripts and styles, and how to fix them for good.

Guide2 min readLast updated
On this page
  1. Does this match what you’re seeing?
  2. Find what’s insecure
  3. Fixing it in WordPress
  4. Fixing it in hand-built sites
  5. A temporary safety net
  6. If it doesn’t work
  7. Common questions

Does this match what you’re seeing?

  • The padlock is missing or shows a warning on an HTTPS page
  • The browser console mentions ‘Mixed Content’
  • Some images or styles don’t load after moving to HTTPS

Mixed content means an HTTPS page loads something — an image, script, stylesheet or font — over plain http://. Browsers block insecure scripts and styles outright and show a warning for the rest.

Find what’s insecure

  1. Open the page in Chrome, Edge or Firefox.
  2. Open developer tools (F12) and the Console tab.
  3. Reload. Each blocked or insecure item is listed with its full http:// address.

Fixing it in WordPress

  1. Settings → General: both addresses must start https://. How to change your WordPress site URL
  2. Old content still contains http:// links in posts. Run a search-and-replace on the database from http://yourdomain.co.uk to https://yourdomain.co.uk, using a search-and-replace plugin that handles serialised data. Take a backup first. How to back up WordPress
  3. Theme and plugin settings: check logo, header image and custom CSS fields for hard-coded http:// URLs.

Fixing it in hand-built sites

Search your files for http:// and change references to your own domain to https:// — or to relative paths such as /images/logo.png.

For third-party resources, use the https:// version. If a service doesn’t offer HTTPS, replace it.

A temporary safety net

This header asks browsers to upgrade insecure requests automatically:

Header always set Content-Security-Policy "upgrade-insecure-requests"

It hides the symptom; still fix the links, because resources without an HTTPS version will fail.

Prefer to follow along?

If it doesn’t work

These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.

Common questions

Why does my site say “Not secure” even though I have SSL?

Usually mixed content: the page loads over HTTPS but pulls in an image, stylesheet or script over plain HTTP, so the browser downgrades the padlock. Find those references and change them to https://.

Your browser’s developer console lists every mixed-content item by name, which is much faster than guessing. On WordPress, the usual culprits are hard-coded image URLs in old posts and a site address still set to http:// in Settings.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going