Website monitoring · No. 05
Mixed content check
In short
Mixed content is any file that a secure page (https://) loads from an insecure address (http://): scripts, stylesheets, images, video. Browsers block the scripts and stylesheets, so carts, forms or widgets stop working. Images and video get retried over https://, and if that fails, they simply don’t show. On top of that, the secure connection icon can disappear from the address bar.
Contents
What is mixed content?
A website with a certificate opens at an address that starts with https://: data between the browser and the server is encrypted, so nobody along the way can quietly read or change it. But a page isn’t a single file. Along with the HTML, the browser loads scripts, stylesheets, fonts, images, video and embedded widgets. If even one of those files is referenced with an http:// address, the page has mixed content.
“‘Mixed content’ refers to securely loaded web pages that use resources to be fetched via HTTP or another insecure protocol.”
Browsers split these files into two groups, and the group decides what happens to the file:
| File type | Example in the code | What the browser does |
|---|---|---|
| Script | <script src="http://…"> | Blocks it |
| Stylesheet | <link rel="stylesheet" href="http://…"> | Blocks it |
| Embedded page, widget | <iframe src="http://…"> | Blocks it |
| Font, script request | @font-face, fetch() | Blocks it |
| Image | <img src="http://…"> | Tries https:// instead; if that fails, there’s no image |
| Video, audio | <video src="http://…"> | Tries https:// instead; if that fails, there’s no file |
The split by type is described in MDN and in the W3C specification (Mixed Content Level 2). There’s one special case: images in srcset or <picture>, and addresses that use an IP instead of a domain name. The browser doesn’t upgrade those to https:// — it blocks them right away.
Why is mixed content a problem?
The first reason: part of your website stops working. Modern browsers don’t take chances — they won’t run insecure scripts and stylesheets on a secure page:
“Browsers mitigate the risks of mixed content by auto-upgrading image, video, and audio mixed content requests from HTTP to HTTPS, and block insecure requests for all other resource types.”
In practice, it looks like a breakdown that the website owner often never sees:
- The cart or checkout doesn’t work if the script for a payment widget or shipping calculator is loaded over http://.
- Forms don’t submit because the validation or sending script is blocked.
- Widgets disappear: reviews, live chat, maps, a video from another service in an
<iframe>. - The design falls apart if a stylesheet or a font is blocked.
- Images go missing — a banner, the logo, a product photo — if the server hosting them doesn’t respond over https://.
The second reason is security. Over an insecure connection, a file can be swapped in transit, and a script on the page has access to everything that happens on it:
“Attacks on active mixed content let an attacker do almost anything to the page.”
The third is trust. According to web.dev, most browsers show in the address bar that the page isn’t secure, even when the page itself is loaded over HTTPS (source). Instead of the familiar secure connection icon, visitors see a warning — and on a payment page or a form that asks for a phone number, that scares people off. Chrome, for example, advises against entering personal information on a page without a secure connection (Chrome Help).
For Google Search, a secure connection is on the list of self-assessment questions about page quality: “Are your pages served in a secure fashion?” (Google Search Central).
Where does mixed content come from?
Most often, from old addresses left in the code or the database after a website moves to https://:
- Moving to https:// without updating links. The certificate is installed, but page content, theme settings and the database still hold absolute
http://addresses for images, files and fonts. - Images from other people’s servers. Product photos, banners or partner logos are embedded with a direct link to a supplier’s website or another service, and that server delivers files over http://.
- The website address in CMS settings. The CMS, theme or caching plugin settings list the website address with http://, and the system inserts it into links to images, stylesheets and scripts on its own.
- Manual additions to the template. Someone added a script or stylesheet with an http:// address to the header or footer.
- Files on another subdomain or server. Images live on a separate server or CDN that has no certificate set up.
- A website move or copy. After a migration, the database still holds http:// addresses of a test or old domain.
How do you spot mixed content?
The symptoms are visible in the browser — if you know where to look:
| What you see | Likely cause | What to do |
|---|---|---|
| An https:// page shows no secure connection icon | The page loads files over http:// | Open the browser console and look for Mixed Content warnings |
| The cart, a form or chat stopped working after an update | The widget script is loaded over http://, and the browser blocks it | Change the script address to https:// or update the widget code |
| The website looks unstyled or falls back to default fonts | A stylesheet or font is blocked | Search the code for http:// in <link> tags and @font-face |
| An empty space where an image should be | The image is at an http:// address, and the server doesn’t respond over https:// | Move the image to your own website or change the address |
| A page looks fine in Chrome, but images are missing in another browser | Browsers handle mixed content differently | Fix the addresses in the code instead of relying on the browser |
How to check for mixed content yourself
You’ll need a browser and a few minutes for each important page:
- Open the page and look at the address bar: instead of the secure connection icon, you may see a warning. Click the icon, and the browser will tell you whether the connection is fully secure.
- Press
F12and open the Console tab. The browser logs a Mixed Content warning there with the exact address of each file it blocked or upgraded to https://. - Open the page source (
Ctrl+U) and search forhttp://(Ctrl+F). Regular links to other websites (<a href>) aren’t mixed content — look atsrc,<link>,srcsetandurl(…). - For each file you find, open its address with
https://instead ofhttp://. If it opens, just fix the address in the code or database. If it doesn’t, move the file to your own website or find another version of the widget. - As an extra safeguard, you can add the
Content-Security-Policy: upgrade-insecure-requestsheader: it asks the browser to load every file over https:// (MDN). But a file that doesn’t exist at an https:// address still won’t load — so fix the addresses anyway. - Or use the FullCheckApp “Mixed content check” and get the results in a clear visual format.
Pay special attention to pages that get opened less often than the home page: the cart, checkout, the thank-you page, older articles. That’s where mixed content lives for years.
If you chose the last option, you’ve already made the right call: the check runs automatically, and you’ll be the first to know about any warning or critical issue.
What FullCheckApp checks
Every day, FullCheckApp checks whether a secure page loads files from http:// addresses: scripts, stylesheets, images, video. It checks your home page and up to 10 inner pages per website.
- How many and which ones. The report shows the number of http:// files, the type of each one (script, stylesheet, image, video) and its exact address.
- What the browser blocks. You see separately how many of these files the browser will block — the ones that can break part of your website.
- How it’s flagged. Mixed content is flagged as a warning: the page opens, but it’s worth fixing.
- How you’ll know. After each check, you get an email report.
script · http://widget.example.com/embed.js
image · http://shop.example.com/uploads/banner-2019.jpg
The service looks at your website from the outside, just like a regular visitor, so there’s nothing to install. Whether the pages open at all is covered by the inner page availability check, and analytics tags that can be blocked too — by the Google Tag Manager check.
FAQ
My website runs on https://, so where does mixed content come from?
The page address only covers the HTML document. Scripts, stylesheets, images and widgets load separately, and the code or database may still hold their old http:// addresses. Most often, it’s left over from moving to https:// without replacing links in content and settings, or a CMS setting that still lists the website address with http://.
Why do images show up even though there’s still a warning?
Most browsers automatically try to load images, video and audio over https://. If the server responds that way, the image shows up, but the browser still logs mixed content in the console, and behavior varies between browsers and versions. It’s more reliable to fix the address in the code than to count on the automatic upgrade.
Are http:// links to other websites mixed content?
No. A regular <a href="http://…"> link just takes the visitor to another page and doesn’t load anything until it’s clicked. Mixed content is files that the page loads by itself: scripts, stylesheets, fonts, images, video, embedded frames and requests made by scripts.
Does mixed content affect Google rankings?
Google doesn’t name mixed content as a separate ranking factor, but a secure connection is on its list of self-assessment questions about page quality. What matters more: blocked scripts and stylesheets break the page for visitors, and a warning in the address bar erodes trust — especially where people enter a phone number or payment details.
Will the upgrade-insecure-requests header help?
Partly. The header asks the browser to load all of the page’s files over https://, and if a file is available at that address, the problem goes away. But a file that doesn’t exist at an https:// address still won’t load. So the header is a backup measure, and you should still fix the addresses in your code and database.
Sources
- MDN Web Docs — Mixed contentdeveloper.mozilla.org/en-US/docs/Web/Security/Mixed_content
- web.dev — What is mixed content?web.dev/articles/what-is-mixed-content
- W3C — Mixed Content Level 2w3c.github.io/webappsec-mixed-content/level2.html
- MDN Web Docs — CSP: upgrade-insecure-requestsdeveloper.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/upgrade-insecure-requests
- Google Chrome Help — Check if a site’s connection is securesupport.google.com/chrome/answer/95617
- Google Search Central — Understanding page experience in Google Search resultsdevelopers.google.com/search/docs/appearance/page-experience
Check your website
Add your website address — the first check runs right away, and you’ll see the status of every item in this article.
Check for free