Mixed content: when HTTPS pages load HTTP resources
Mixed content is an HTTPS page that references HTTP resources (images, scripts, stylesheets). Modern browsers block these or downgrade the page lock icon, which damages trust and breaks functionality.
Mixed content is an HTTPS page that references HTTP resources (images, scripts, stylesheets). Modern browsers block these or downgrade the page lock icon, which damages trust and breaks functionality. When a page served over HTTPS includes a resource (CSS, JS, image, iframe) loaded over plain HTTP, browsers either silently block the resource (for scripts) or warn the user. Common causes: hard-coded HTTP URLs in legacy templates, third-party widgets that haven't migrated.
Last updated·
What it is
When a page served over HTTPS includes a resource (CSS, JS, image, iframe) loaded over plain HTTP, browsers either silently block the resource (for scripts) or warn the user. Common causes: hard-coded HTTP URLs in legacy templates, third-party widgets that haven't migrated.
Why it matters
Blocked mixed content means broken layouts, missing images, or non-functional analytics. The "Not Secure" indicator destroys conversion. Search engines also penalise pages with persistent mixed content warnings.
How to fix it
- Use protocol-relative or absolute HTTPS URLs. Replace src="http://..." with src="https://...". Never use protocol-relative ("//...") for new code — Google deprecated it.
- Audit third-party embeds. Tag managers, chat widgets, video embeds — confirm each loads over HTTPS. Most providers offer HTTPS versions now; if not, replace the provider.
- Add Content-Security-Policy: upgrade-insecure-requests. This header tells the browser to silently upgrade HTTP requests to HTTPS where possible. A bandage, not a fix — but catches stragglers.
- Set up a daily mixed-content scan. A crawler that checks for HTTP references on every URL catches regressions from a single CMS edit before users see broken images.
Authoritative sources
- Google Search Central documentation — Google
- Schema.org vocabulary — schema.org
- SEO Starter Guide — Google Search Central
- MDN — HTML meta and link elements — Mozilla MDN