How to fix mixed content warnings on an HTTPS site
To fix mixed content warnings, find every resource your HTTPS page loads over plain http, change those references to https (or protocol-relative paths), then add an upgrade-insecure-requests rule as a backstop for anything you miss.
Mixed content happens when a page is served securely over https but pulls in images, scripts, stylesheets, fonts or iframes over insecure http. The browser shows a 'not fully secure' notice, and in many cases it blocks the insecure files outright, which can break layout or features.
This guide covers how to find every offending resource, update it properly, and confirm the fix. The free EB Security check is an external scan that flags whether your homepage serves mixed content, so it is handy as a quick before-and-after signal.
What mixed content is, and why browsers complain
A secure https page tells the browser the connection is encrypted. If that same page then requests a file over http, that one file travels unencrypted, so the page is no longer fully secure and the browser cannot honestly show a padlock for the whole thing.
There are two kinds. Passive mixed content (images, audio, video) usually triggers a warning but still loads. Active mixed content (scripts, stylesheets, iframes, fonts, fetch/XHR) is higher risk because it can alter the page, so modern browsers block it by default. That blocking is often why a menu, slider or form stops working after a move to https.
- Passive: img, audio and video source files over http. Warned, often still shown.
- Active: script, stylesheet, iframe, web fonts and fetch/XHR over http. Usually blocked.
- The result: a 'not secure' or 'not fully secure' notice, and sometimes broken page features.
Step 1: find every insecure resource
You cannot fix what you cannot see, so start by listing every http resource the page loads. Your browser already knows, so use its developer tools.
Work through your key templates, not just the homepage, because a hard-coded http image can hide on a single product page or an old blog post.
- Open the page, press F12, and read the Console: blocked active mixed content is logged there by name.
- In the Network tab, look for any request URL starting http:// on an https page.
- Search your codebase, theme and database for the literal text http:// to catch hard-coded links, especially in widgets, page builders and email templates.
- On WordPress, check Settings, theme options, and any cached or minified files that may still reference http://.
Step 2: update references to https
For each insecure resource, point it at the secure version. The cleanest fix is an absolute https:// URL when you know the host serves https, which almost every reputable CDN and host now does.
Avoid deleting a resource unless it is genuinely unused. The goal is the same content delivered securely, not a broken page.
- Change http://example.com/file.jpg to https://example.com/file.jpg where the host supports https.
- Protocol-relative paths (//example.com/file.jpg) follow the page's protocol, but prefer explicit https where you can.
- For your own assets, update the stored URLs. On WordPress, a careful database search-and-replace handles old http:// links in content.
- If a third party only offers http, replace it with a secure alternative or host the file yourself over https.
Free, instant, no account
See your site's security grade in seconds.
Free, instant, and no account needed to see your grade.
Scan my site freePlain-English A to E grade in about 10 seconds. No account needed to see it.
Step 3: add upgrade-insecure-requests as a backstop
Even after a careful pass, a stray http reference can slip back in through a new plugin, an embed or an old link pasted into the editor. The upgrade-insecure-requests directive tells the browser to request any http resource over https instead.
Add it as a Content-Security-Policy response header (or a meta tag) so it covers the whole page. It is a backstop, not a substitute for fixing the source: if a resource has no https version at all, the upgraded request can still fail, so keep the underlying references clean.
- Header form: Content-Security-Policy: upgrade-insecure-requests
- It silently rewrites http subrequests to https, clearing most passive warnings.
- It only helps where an https version actually exists, so keep correcting the real links too.
Step 4: confirm the page is clean
After the fix, reload with the developer Console open and check there are no mixed content messages and no blocked requests. Click the padlock to confirm the browser now reports a fully secure connection.
For an outside view, run the free EB Security check. It is a passive, external scan that reads your homepage as a visitor would, in about ten seconds, and flags mixed content alongside related HTTPS issues. It scans the homepage only, so always re-check inner pages in your own browser, since mixed content can live on a single template.
- EB Security checks HTTPS basics too: that http:// redirects to https://, that your certificate is valid, trusted and in date, and whether outdated TLS 1.0/1.1 is still accepted.
- It does not log in or crawl every page, so treat the grade as a fast signal, not a full audit.
- Re-check inner templates yourself, because the scan covers the homepage it is given.
Mixed content warnings are fixable in three moves: find every http resource with your browser's dev tools, switch those references to https, then add upgrade-insecure-requests as a backstop. Confirm with the Console and a free external scan, and remember to check inner pages, not just the homepage.