Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Mixed content blocked: HTTPS page loads HTTP scripts or stylesheets

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Mixed content means a page loaded over HTTPS still pulls a resource over HTTP (or another insecure protocol). Browsers reduce that risk by auto-upgrading image, video and audio requests from HTTP to HTTPS, and by blocking insecure requests for other resource types. If a script, stylesheet, font, fetch, or XHR still points at http:// on an HTTPS page, the browser blocks it and part of the page fails.

What the symptom means

MDN's Mixed content article defines mixed content as securely loaded pages that use resources fetched via HTTP or another insecure protocol. Those resources can be viewed or changed on the path. Scripts are called out as especially dangerous because they can change any part of the page; other types still carry risk.

MDN splits mixed content into upgradable and blockable:

  • Upgradable: insecure requests that the browser should automatically upgrade by changing the scheme from http to https. This currently covers common image, video and audio cases (with limits MDN lists, including when the host is an IP address).
  • Blockable: all mixed content that is not upgradable. MDN's non-exhaustive list includes script (via src), stylesheets via link href, iframes via src, fetch() requests, XMLHttpRequest requests, CSS <url> uses such as @font-face, and web fonts.

So a broken layout or dead behaviour on an HTTPS site, with a developer-console line about mixed content or a blocked stylesheet/script, is often a blockable http:// URL still embedded in HTML, CSS or a theme template. Images may quietly upgrade; scripts and CSS usually will not.

Likely causes

Cause What you see How to confirm
Script or stylesheet still on http:// Console shows a blocked mixed-content request; feature missing Developer tools Network/Console name the http:// URL
Font or CSS url(http://…) Typical effect: text falls back; console lists the font or CSS URL Inspect the stylesheet that references it
fetch / XHR to http:// Feature fails; console shows a blocked request Reproduce the action with the Network panel open
Third-party widget on HTTP only One embed broken while the rest of the page is fine The blocked URL's host is not your site
Image/audio/video on HTTP Typical effect: may work after auto-upgrade, or fail with 404 if no HTTPS asset Console upgrade warning, or 404 after upgrade

Prove the cause before changing anything

All of these are read-only.

1. Open the browser developer console on the HTTPS page. MDN says the console shows warnings when mixed content is upgraded or blocked. Copy the exact blocked URL and type (script, stylesheet, font, XHR).

2. Confirm the page itself is HTTPS. Mixed content is about insecure resources inside a secure page. An all-HTTP site is a different problem.

3. Find where the http:// URL is written. Search the theme, page HTML, site settings and stored content for that host and path. Note every file or CMS field that embeds it.

4. Check whether an HTTPS version of the asset exists by requesting the same path with https:// in the address bar. MDN's fix guidance depends on serving content as HTTPS.

Fix

MDN's fix strategy is to serve all content as HTTPS: serve your own content over HTTPS; make references on your domain relative or HTTPS links (including downloads); and use HTTPS versions of third-party resources when they exist. It notes that replacing http:// with https:// and then checking the links is often the easiest approach.

Edit an HTML or theme file that still hard-codes http://

When the console names a file you control (theme template, static HTML, or CSS file), change those resource URLs.

Download or copy that file first and keep the copy outside the site tree, for example header-before.php or style-before.css on your workstation, matching the real file name.

Risk: the next step edits the live theme or HTML file and changes resource URLs from http:// to https:// or to relative links. A wrong path breaks scripts, styles or fonts for every visitor until you restore the saved file.

In the file manager or your editor, open the live file and change each blocked resource URL to https:// on the same host and path, or to a root-relative or path-relative link as MDN allows. Save the file. Hard-refresh the HTTPS page and re-check the console.

To undo it: replace the live file with the saved copy you took first.

Example (illustrative): https://www.example.com/ loads, but the menu script fails. The console blocks http://www.example.com/wp-content/themes/site/menu.js. The theme header still prints that http:// script URL. After a saved copy is taken, the URL is changed to https://www.example.com/wp-content/themes/site/menu.js (or /wp-content/themes/site/menu.js), and the console no longer reports mixed content for that script.

If the asset is on another site and no HTTPS URL exists, MDN's fix strategy offers no other route for that embed: blockable mixed content stays blocked until the page stops requesting the insecure URL.

Confirm the fix

  1. Reload the HTTPS page with a cold cache.
  2. The developer console shows no new blocked mixed-content errors for scripts, stylesheets, fonts or XHR/fetch.
  3. The feature that depended on the blocked file works again.

What to watch afterwards

  • After a theme or plugin update, re-check the console; updates can reintroduce hard-coded http:// asset URLs.
  • Prefer relative or HTTPS links for new content so HTTP copies are not stored again.
  • Certificate and redirect problems are separate: a bad certificate or HTTPS redirect loop can appear while you are cleaning mixed content, but they are different faults.

Risks and limits

  • Auto-upgrade applies to the upgradable media cases MDN lists; it does not make blockable scripts and stylesheets safe to leave on HTTP.
  • Mixed content requests that would otherwise be upgraded are blocked when the URL host is an IP address rather than a domain name, per MDN.
  • Editing a parent theme can be overwritten on theme update; prefer a child theme or CMS field when that is how the site is built (general practice, not an MDN statement).
  • These edits have not been lab-tested.

Sources

  • Mixed content — MDN Web Docs, baseline widely available since January 2020 (page statement), accessed 1 December 2026