Fix Mixed Content Warnings
http://, and change them to https:// in your templates, content or database. Then add the upgrade-insecure-requests header as a safety net. Browsers block active mixed content such as scripts and warn about passive content such as images.Mixed content warnings: what mixed content is
When a page is delivered over HTTPS but pulls in an image, script, stylesheet, iframe or font over plain HTTP, the page is "mixed". The insecure resource can be read or altered in transit, so browsers either block it or drop the padlock.
| Type | Examples | Browser behaviour |
|---|---|---|
| Active | Scripts, stylesheets, iframes, XHR or fetch calls | Blocked, which often breaks the page |
| Passive | Images, audio, video | Usually auto-upgraded or loaded with a warning, depending on browser |
Mixed content warnings: find the culprits
- Open the page, press F12 and read the Console. Messages name each blocked or insecure URL.
- Check the Network tab and filter for
http:. - View the page source and search for
http://. - Scan the whole site with the broken link checker, and check key pages with the SEO checker.
Fix at the source
- Hard-coded URLs: change them to https:// or to protocol-relative or root-relative paths such as
/images/logo.png. - CMS content: in WordPress, set both URLs to https in Settings, General, then update old links in posts and the database with a trusted search-replace tool. Back up first.
- Third-party scripts: use their HTTPS URLs. If a provider offers none, replace or drop it.
- CSS and fonts: check
url(http://...)values in stylesheets. - Embeds: update iframe and video sources.
Add a safety net
The Content Security Policy directive below tells browsers to upgrade insecure subrequests automatically:
# Nginx
add_header Content-Security-Policy "upgrade-insecure-requests" always;
# Apache
Header always set Content-Security-Policy "upgrade-insecure-requests"
This helps only when the resource is actually available over HTTPS. If the HTTPS version does not exist, the request fails, so keep fixing the URLs. Also confirm the whole site redirects correctly using the HTTPS redirect checker, and review your other headers with the security headers tool.
Still seeing a warning?
| Cause | Check |
|---|---|
| Cached page or CDN copy | Purge the cache and test in a private window |
| Resource loaded by JavaScript | Search scripts and plugin settings for http:// |
| Image srcset or CSS background | These are easy to miss in the HTML source |
| Certificate problem on the resource's host | Test the host with the SSL checker |
| Form posts to an HTTP address | Check the form action attribute |
If the browser shows a certificate error rather than a mixed content notice, read how to fix a certificate that is not trusted.
Why it matters
Besides the visible warnings, mixed content can break features and make visitors doubt the site. It is also one of the main clean-up tasks after switching to HTTPS. See Does HTTPS Affect Google Rankings? for the full migration checklist.
Related reading: Cloudflare SSL with WordPress, free SSL for WordPress, HTTPS on React sites and fixing SSL certificate errors.
Frequently Asked Questions
Why does the padlock show but with a warning?
Passive mixed content such as an image over HTTP can remove the secure indicator without blocking the page.
Is upgrade-insecure-requests enough?
It is a good backup but not a replacement for fixing the URLs, especially for third-party resources.
Does mixed content affect SEO?
Indirectly. Broken scripts and trust warnings hurt user experience, and a clean HTTPS setup is part of good technical SEO.
Can plugins fix it for me?
Some CMS plugins rewrite URLs on the fly. They are handy, but fixing the stored content is cleaner and faster.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.