Mixed Content Checker

Identify and fix mixed content issues that weaken your HTTPS security. Use the interactive scanner below to analyze HTML code for mixed content, review common issues with the checklist, and learn how to fix every type of mixed content problem.

Mixed Content Checklist

Mixed Content Checker
Figure 1 — Mixed Content Checker

What Is Mixed Content?

Mixed content occurs when an HTTPS page loads sub-resources (scripts, images, stylesheets, etc.) over insecure HTTP connections. This creates a security gap because the HTTP resources can be intercepted and modified by attackers on the network, undermining the protection that HTTPS provides. Even if your website has a valid SSL certificate, mixed content weakens the entire security chain.

This is especially relevant for websites served through port-forwarded home servers or any site where traffic passes through shared networks. Without proper HTTPS enforcement, an attacker on the same network — or anyone performing a man-in-the-middle attack — can inject malicious content into HTTP-loaded resources. Protect your browsing by using DNS over HTTPS and a VPN on your router.

Active vs Passive Mixed Content

Browsers distinguish between two categories of mixed content, treating each differently in terms of blocking behavior and security risk:

TypeResourcesRiskBrowser Behavior
Active (Critical)Scripts, stylesheets, iframes, XHR/fetch, fontsCan modify the entire page, steal data, redirect usersBlocked by default in all modern browsers
Passive (Warning)Images, video, audioCan replace visual content but cannot execute codeLoaded with console warning; some browsers auto-upgrade

Pro Tip: Modern browsers (Chrome 80+, Firefox 80+) are increasingly auto-upgrading passive mixed content from HTTP to HTTPS. However, you should not rely on this — if the HTTPS version does not exist, the resource will fail to load. Always fix mixed content at the source by updating URLs in your code. Use the CSP header upgrade-insecure-requests as a safety net, not a primary fix.

Common Causes of Mixed Content

Mixed content issues often arise during HTTPS migration or when integrating third-party resources. Here are the most frequent causes:

  • Hardcoded HTTP URLs — HTML templates or CMS content containing absolute http:// URLs that were not updated during migration.
  • Third-party widgets — Analytics scripts, ad networks, or embedded maps served over HTTP.
  • CDN misconfiguration — Content delivery networks that do not properly support HTTPS or have incorrect SSL certificates.
  • User-generated content — Images or links submitted by users with HTTP URLs.
  • CSS background images — Background image URLs in stylesheets that still use HTTP.
  • Legacy CMS plugins — WordPress or Joomla plugins that hardcode HTTP asset URLs.

How to Fix Mixed Content

Fixing mixed content involves updating all HTTP resource URLs to HTTPS. Here are the approaches for different scenarios:

Quick Fix: Protocol-Relative URLs

<!-- Before (mixed content) -->
<img src="http://cdn.example.com/image.jpg">

<!-- After (protocol-relative) -->
<img src="//cdn.example.com/image.jpg">

<!-- Best practice (explicit HTTPS) -->
<img src="https://cdn.example.com/image.jpg">

CSP Upgrade Directive

<!-- Add to HTML head or server response headers -->
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

# Or as a server header (Nginx)
add_header Content-Security-Policy "upgrade-insecure-requests" always;

Database URL Replacement (WordPress)

# Replace all HTTP URLs in WordPress database
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --dry-run
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com'

For comprehensive HTTPS security, combine mixed content fixes with proper HTTP security headers and strong WiFi encryption.

Note: Protocol-relative URLs (starting with //) were once the recommended approach but are now considered a legacy pattern. Explicit https:// URLs are preferred because they work correctly in all contexts, including when pages are loaded from local files or non-HTTP contexts. Always use explicit HTTPS URLs in new code.

Mixed Content in Network Equipment

Router admin panels and network management interfaces are often guilty of mixed content issues, especially on older devices. When you access your router at 192.168.1.1, the admin interface may load resources (firmware update checks, help documentation, external scripts) over HTTP even if you are connected via HTTPS.

Device TypeCommon IssueRisk
Router admin panelsFirmware check over HTTPFake update could install malicious firmware
NAS devicesExternal help links over HTTPHelp page could be replaced with phishing
IP camerasVideo stream over HTTPStream could be intercepted or replaced
Smart home hubsCloud API calls over HTTPCommands could be intercepted or injected

This is another reason to keep your router firmware updated and to access admin panels from a secure, segmented network. Use our Port Checker to verify that your admin panel is not exposed to the internet.

Testing for Mixed Content

Beyond the HTML scanner above, use these methods to detect mixed content on live websites:

Browser Console

# Open DevTools (F12) → Console tab
# Mixed content warnings appear as:
# "Mixed Content: The page was loaded over HTTPS, but requested
#  an insecure resource 'http://...' This request was blocked."

Content Security Policy Reporting

# Add report-only CSP header to collect violations
Content-Security-Policy-Report-Only: default-src https:; report-uri /csp-report

CSP reporting is the most thorough method because it catches issues across all pages without manually visiting each one. See our HTTP Headers Checker for more on implementing CSP. Also check your DNS configuration to ensure all subdomains resolve correctly over HTTPS.

Impact on SEO and User Trust

Mixed content does not just affect security — it also impacts your website's search engine ranking and user trust:

  • Browser warnings — The padlock icon disappears or shows a warning, making visitors distrust your site.
  • SEO penalties — Google considers HTTPS a ranking signal and may penalize sites with mixed content issues.
  • Resource blocking — Active mixed content is blocked by browsers, potentially breaking functionality.
  • Performance impact — HTTPS resources benefit from HTTP/2 multiplexing; mixed HTTP resources cannot.
Key Takeaways
  • Mixed content occurs when HTTPS pages load resources over insecure HTTP connections.
  • Active mixed content (scripts, iframes) is blocked by browsers; passive (images) shows warnings.
  • Always use explicit https:// URLs — avoid protocol-relative URLs in new code.
  • Use the CSP upgrade-insecure-requests directive as a safety net during HTTPS migration.
  • Router admin panels and IoT devices are common sources of mixed content vulnerabilities.
  • Combine mixed content fixes with proper security headers and network security.

Video: Understanding Mixed Content and HTTPS

Related Guides

Frequently Asked Questions

Will mixed content break my website?

Active mixed content (scripts, iframes, stylesheets) is blocked by all modern browsers, which can break functionality. Passive mixed content (images, video) may still load but with a console warning. Fixing all mixed content ensures your site works correctly for all visitors.

How do I find all mixed content on a large website?

For large sites, use CSP reporting with the report-uri directive to collect all violations across all pages. You can also use crawling tools that check every page. Our HTML scanner above works for individual pages — paste the source code of any page to check it.

Does upgrade-insecure-requests fix everything?

The CSP upgrade-insecure-requests directive tells browsers to automatically upgrade HTTP requests to HTTPS. However, if the HTTPS version of a resource does not exist, it will fail to load. Use it as a safety net during migration, but always update the actual URLs in your code for a permanent fix.

What about internal links — are HTTP links mixed content?

Regular anchor links (<a href="http://...">) are not considered mixed content because they navigate away from the current page rather than loading a sub-resource into it. However, it is still best practice to use HTTPS links everywhere for consistency and to avoid redirect chains.

Can mixed content be exploited on my home network?

Yes. If you access any HTTPS website with mixed content while on an insecure network (public WiFi, compromised router), an attacker can modify the HTTP resources. This is why it is important to secure your home WiFi and use a VPN on untrusted networks.

Is mixed content a concern for router admin panels?

Yes. Many router admin interfaces at 192.168.1.1 load resources over HTTP. This is a security risk especially if you access the admin panel over WiFi. Update your firmware to get the latest security fixes for the admin interface.

How do I test mixed content without deploying to production?

Use browser DevTools to check for mixed content warnings in the console. You can also add a Content-Security-Policy-Report-Only header in your staging environment to collect violations without blocking any content. This lets you identify and fix issues before going live.

About Tommy N.

Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.

Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.

Once done, hit any button as below