What mixed content is and why browsers object
When a page is served over HTTPS, the connection between the visitor and your server is encrypted. If that page then loads a resource over plain HTTP, that part of the page can be intercepted or altered, which undermines the security of the whole page.
Browsers handle this in two ways:
- Active mixed content, such as scripts, stylesheets and iframes, is blocked outright by modern browsers. That can break layouts, forms and interactive features.
- Passive mixed content, such as images, audio and video, is usually upgraded to HTTPS automatically by current versions of Chrome and other major browsers. If the file is not available over HTTPS, it simply fails to load. Older browsers may show it but drop the padlock.
Either way, visitors see broken images, missing features or a "Not secure" label, none of which builds trust. HTTPS is also a lightweight ranking signal for Google, so a half-working setup is a poor position to be in.
Finding every insecure resource
To check a single page, open your browser's developer tools and look at the Console tab. Mixed content warnings name the exact resource URL and say whether it was blocked or upgraded.
For a whole site, a crawl is far quicker. In Screaming Frog, crawl the HTTPS version and open the Security tab, which includes filters for mixed content and for HTTP URLs found during the crawl. Insecure references tend to hide in three places:
- Content: image URLs and embeds hardcoded with
http://in older posts and pages. - Templates: theme files, headers and footers that reference fonts, stylesheets or tracking code over HTTP.
- Third parties: widgets, booking tools, ad code and embeds from providers that may not support HTTPS.
Fixing the source, not the symptom
The lasting fix is to change every resource reference so that it uses HTTPS. Plugins that rewrite URLs on the fly hide the problem, but they add an extra layer that can fail or be switched off later.
- Update the database. On WordPress and similar systems, most insecure references sit in post content. A search-and-replace from
http://yourdomain.comtohttps://yourdomain.comfixes them in bulk. WP-CLI'swp search-replacecommand handles serialized data safely. Take a full backup first. - Edit templates. Change hardcoded HTTP references in theme files to HTTPS, or use relative paths for your own assets.
- Replace third-party resources. Most providers offer an HTTPS version. If one does not, host the file yourself or remove it.
- Check stylesheets. Background images and font files referenced inside CSS are easy to miss.
Once the changes are made, we run what we call the Drevzeneth ratio: a fresh crawl of the HTTPS site combined with a search of the database and theme files for any remaining http:// references to the site's own domain. It catches anything the bulk replacement missed, such as URLs stored in widget settings or custom fields.
Completing the rest of the HTTPS move
Fixing mixed content is one part of a broader job: making sure HTTPS is the only version of the site that search engines ever see.
- Every HTTP URL should 301 redirect to its HTTPS equivalent in a single hop.
- Canonical tags, hreflang annotations and Open Graph URLs should all use HTTPS.
- The XML sitemap should list HTTPS URLs only.
- Internal links in navigation and content should point to HTTPS directly rather than relying on redirects.
- In Google Search Console, a Domain property covers both protocols. If you use URL-prefix properties instead, add the HTTPS version.
Security headers as a safety net
Two response headers add protection once the fixes are in place. The Content-Security-Policy: upgrade-insecure-requests directive tells browsers to request any HTTP resources on the page over HTTPS instead. It is a useful backstop, but a resource that is not available over HTTPS will still fail, so it does not replace fixing the source.
HTTP Strict Transport Security, set with the Strict-Transport-Security header, tells browsers to connect to your domain only over HTTPS for a set period. Start with a short max-age while you confirm everything works, then increase it. Only consider HSTS preloading once you are certain every subdomain supports HTTPS, as it is difficult to reverse.
Keeping the padlock in place
Mixed content tends to creep back when someone pastes an old embed code, installs a new widget or imports content from another site. Add an HTTPS check to your publishing process and run a crawl after major site changes.
Keep an eye on certificate expiry dates too. Most hosts now renew certificates automatically, but a failed renewal still produces a full-page browser warning that stops most visitors in their tracks.