Blog / How the internet works /
Mixed content warnings and how to fix them
You installed an SSL certificate. The address starts with https://. And yet the browser says “Not secure”, the padlock is missing, or half your images have vanished.
Welcome to mixed content, one of the most common leftovers after moving a site to HTTPS.
What mixed content is
A page loaded over secure HTTPS can pull in other things: images, scripts, stylesheets, fonts, videos, iframes. If any of those are requested over plain http://, you’ve mixed secure and insecure content on the same page.
Think of a bank with a bulletproof front door and an open side window. The door being strong doesn’t help if the window is wide open.
Two types, very different
Passive mixed content
Images, audio and video loaded over HTTP. Browsers may load them but mark the page as not fully secure, or upgrade them automatically.
Active mixed content
Scripts, stylesheets and iframes loaded over HTTP. These can change what the page does, so browsers block them. When you see broken layouts, dead menus or non-working sliders after an HTTPS move, this is usually why.
How to find the culprits
Use the browser console
Open the page, right-click, choose Inspect, then open the Console tab. Mixed content messages name the exact insecure URL, like “Mixed Content: The page at … was loaded over HTTPS, but requested an insecure image …”.
The Security panel (in Chrome-based browsers) or the Network tab with filter http: also helps.
Search your content
Most causes are hard-coded http:// links in:
- Old blog posts and pages (images inserted years ago).
- Theme settings and widgets (logo, background images).
- Custom CSS and JavaScript files.
- Page builder sections.
- Embedded third-party code (old widgets, fonts, maps, videos).
- Menu items and button links.
Run a crawler or scanner
A site crawler can flag every page that references an http:// resource. For a big site, that’s quicker than checking by hand. If you’ve just moved domains or hosts, it belongs in your post-move checks; I listed those in ssl and https checks for a domain migration.
How to fix it
1. Change the URL to HTTPS
The cleanest fix. Edit the post, theme setting or template so the link starts with https://. If the other site supports HTTPS, this just works. Many don’t, which leads to the next point.
2. Use relative or protocol-safe URLs where appropriate
For your own files, /wp-content/uploads/photo.jpg (a path without the domain) avoids the problem completely. Better still, host the files on your own site and link to them.
3. Replace in the database (carefully)
On WordPress, old http://yourdomain.com addresses often sit in post content. A search-and-replace tool for the database can swap them in bulk. Take a full backup first, work on staging if you can (see staging sites: testing changes before they go live), and make sure the tool handles serialised data properly. A careless text replace on the raw database can corrupt settings.
4. Fix the source: theme, plugin or CDN settings
Sometimes a plugin or theme setting still has the old HTTP address saved. Check your site URL and home URL in WordPress settings, your CDN address, and any “force HTTPS” options. Shopify stores serve over HTTPS by default, so mixed content there is usually a hard-coded link in a theme file or an old app snippet.
5. Remove what’s dead
If an old widget or embedded script points to a site that no longer exists, delete it. Don’t rebuild an HTTPS link to nothing.
6. A safety net
You can ask browsers to upgrade insecure requests with a Content-Security-Policy: upgrade-insecure-requests header. It’s a useful backstop for stragglers, but it only works if the resource is actually available over HTTPS, and it hides rather than fixes. Treat it as a net under the fix, not the fix itself.
Check, don’t assume
After the changes, clear all caches (browser, plugin, server, CDN), then reload the page in a private window and look at the console again. Check the homepage, a blog post, a product page, checkout, and any page with an embed.
Don’t forget:
- Open Graph and social images, which may still use an old HTTP address. Look at how your link previews appear.
- Sitemaps and canonical tags, which should all use HTTPS.
- Redirects: HTTP should go to HTTPS with a single 301. See redirects on WordPress: 301, 302 and the mistakes I keep seeing.
If your certificate itself is the problem rather than the content, SSL certificates and HTTPS issues: a fix list is the right next read.
Why it matters
Mixed content weakens the point of HTTPS, because a visitor on an untrusted network can tamper with the insecure parts. It can also break features, scare visitors with warnings, and reduce trust right where it matters, such as checkout and login pages. Searching is rarely hurt directly, but a broken page hurts people, and that hurts everything else.
Key takeaways
- Mixed content means a secure page loads something over HTTP.
- Active content (scripts, styles) is blocked; passive (images) is flagged.
- The browser console tells you exactly which URL is the problem.
- Fix at the source with HTTPS URLs; use database replace and security headers carefully.
- Test again after clearing every cache.
FAQ
Why does the warning appear on only some pages?
Because the insecure link lives in that page’s content or template, not site-wide.
Will a plugin fix everything?
It can help with simple cases, but you should still find the source and fix it where possible.
Related reading
Which page on your site would a customer least forgive for showing a “not secure” label? Test that one first.