troubleshooting 2026-12-02 ⏱ 3 min read

Fix Mixed Content Warnings

Fix Mixed Content Warnings
Quick Answer: Open your browser's developer console, find the resources loaded over 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.

TypeExamplesBrowser behaviour
ActiveScripts, stylesheets, iframes, XHR or fetch callsBlocked, which often breaks the page
PassiveImages, audio, videoUsually auto-upgraded or loaded with a warning, depending on browser

Mixed content warnings: find the culprits

  1. Open the page, press F12 and read the Console. Messages name each blocked or insecure URL.
  2. Check the Network tab and filter for http:.
  3. View the page source and search for http://.
  4. 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?

CauseCheck
Cached page or CDN copyPurge the cache and test in a private window
Resource loaded by JavaScriptSearch scripts and plugin settings for http://
Image srcset or CSS backgroundThese are easy to miss in the HTML source
Certificate problem on the resource's hostTest the host with the SSL checker
Form posts to an HTTP addressCheck 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.

🛡️ Scan Your Site for Mixed Content & Security Headers
Scan Security Headers →

✅ 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 www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant