Fixing mixed content warnings after switching to HTTPS Print

  • mixed content, https, ssl, wordpress
  • 0

You switched to HTTPS, but the browser shows "Not secure" or part of the page looks broken. Something on the page is still loaded over plain http://.

Find the culprit

  1. Open the page, press F12 and look at the Console tab.
  2. Look for lines that say "Mixed Content" with the offending address.

Fix it

  • WordPress: check that Settings, then General, uses https://. Old posts often still hold http:// links and images. A search-and-replace plugin, run on a backup first, changes them all at once.
  • Theme or plugin files: search for hard-coded http:// addresses in your theme settings and widgets.
  • Other sites' resources: change the address to https://. If the other site does not support it, host the file yourself or remove it.

As a stopgap, you can ask browsers to upgrade the requests by adding this to .htaccess:

<IfModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests"
</IfModule>

It hides the symptom, so still fix the actual addresses when you can.

If it doesn't work


Was this answer helpful?

« Back