Mixed content check: insecure http:// resources on HTTPS pages

Short answer

Mixed content is an https:// page that loads scripts, stylesheets, images or forms over plain http://. It breaks the padlock and lets an attacker swap those files. SiteShield scans your homepage HTML for http:// in src attributes, stylesheet links and form actions and fails the check if it finds any (5 of 100 points).

Server hygieneWorth 5 of 100 pointsBy Mumshad JawadUpdated

What is Mixed content?

Browsers block "active" mixed content (scripts, stylesheets, iframes) outright, which often shows up as a broken layout, and they upgrade or warn about "passive" mixed content such as images. A form that submits to an http:// address sends whatever the visitor typed unencrypted.

Weak
<script src="http://cdn.example.net/widget.js"></script>
<form action="http://example.com/contact">
Good
<script src="https://cdn.example.net/widget.js"></script>
<form action="/contact">

Why it matters

Loading scripts, images or styles over http:// on an https:// page breaks the padlock and lets attackers swap those files.

An attacker on the network can replace an http:// script with their own code, which then runs on your secure page with full access to it: the same outcome as a cross-site-scripting attack. Insecure form actions hand over names, emails and messages in clear text.

SiteShield maps this check to:

OWASP ASVS V9

See how these standards fit together in the UAE website security checklist.

How SiteShield grades it

This check, "No mixed content", can cost up to 5 points: a fail loses all 5, a warning loses 3. Every scan starts at 100.

ResultWhenPoints lost
PassNo http:// src, stylesheet link or form action is found in the homepage HTML.0
FailOne or more are found. The report lists up to five hostnames they load from.5
Not checkedNot checked if the site didn't load over HTTPS.0

How to check it yourself

Browser developer tools list mixed content in the Console. From a terminal, a rough search of the homepage HTML:

curl -s https://example.com | grep -oE '(src|href|action)="http://[^"]+' | sort -u

Or run a free SiteShield scan, which checks this and 16 other settings in one go.

How to fix it

The quick version: Change every http:// resource link on the page to https:// (or a relative path).

Any site

  1. Change each http:// URL to https:// (check the file really exists there) or to a relative path like /images/logo.png.
  2. Remove widgets or scripts whose provider doesn't offer HTTPS.

Cloudflare

Turn on SSL/TLS → Edge Certificates → Automatic HTTPS Rewrites. Cloudflare rewrites http:// links to https:// when it knows the resource is available securely. It's a safety net; fix the source too.

Nginx / Apache

As a temporary stop-gap, the CSP directive upgrade-insecure-requests makes browsers fetch http:// resources over https://. Add it to your existing policy rather than a second CSP header.

# Nginx
add_header Content-Security-Policy "upgrade-insecure-requests" always;
# Apache
Header always set Content-Security-Policy "upgrade-insecure-requests"

WordPress

Most mixed content after an HTTPS move is old URLs stored in posts, widgets and theme options. Replace them with WP-CLI (back up first), then clear any page cache:

wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid --dry-run
wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid

FAQ

Does SiteShield check every page for mixed content?

No, it checks the homepage HTML only, to keep scans passive and fast. Fix the homepage first, then use the browser console on your other key pages (contact, checkout, login).

Are http:// links (a href) mixed content?

No. Ordinary links to other http:// sites are not mixed content. Only resources the page loads (scripts, styles, images, frames) and form submissions are.

Test your Mixed content now

Run all 17 checks on your website and email domain in about 30 seconds. Free, no signup, passive checks only.

Rather not do it yourself? Fix it for me starts at AED 750 (about USD 205 by PayPal), quote agreed first. Monitoring re-scans weekly for AED 99/month or AED 990/year.

Related checks

See all 17 security checks →