How to fix mixed content warnings on an HTTPS site

What mixed content is, why browsers block it, and how to find and fix insecure images, scripts and links so your site shows as fully secure.

By the UK Technology Hub teamPublished 4 minute read

The short answer

Mixed content happens when a secure HTTPS page loads images, scripts, stylesheets or other files over insecure HTTP. Browsers block risky resources and may show the page as not fully secure. Find insecure URLs with browser developer tools or a scanner, update them to HTTPS in your content, theme, plugins and settings, and use a Content Security Policy rule to upgrade remaining requests.

You've moved your site to HTTPS, but the padlock is missing, images are broken or features don't work. The likely culprit is mixed content: parts of the page still loading over HTTP.

Why it matters

HTTPS encrypts traffic between visitors and your site. If a secure page loads a script over HTTP, an attacker could tamper with that script. Browsers therefore block "active" mixed content, such as scripts and iframes, and increasingly upgrade or block "passive" content like images. The result can be broken layouts, missing features and security warnings.

Step 1: Find the insecure resources

Browser developer tools. Open the Console; mixed content warnings list each insecure URL. The Network tab shows which requests used HTTP.

Online scanners. Tools can crawl your site and list pages with mixed content.

Search your content. Look for "http://" in your database, theme files and settings.

Step 2: Fix URLs in content

Old posts and pages often contain hard-coded HTTP links to images. For WordPress, a careful database search-and-replace from "http://yourdomain" to "https://yourdomain" fixes most issues. Use a tool that handles serialised data correctly, and back up first.

Step 3: Fix theme and template code

Check templates, stylesheets and scripts for hard-coded HTTP URLs, including fonts and background images in CSS. Use HTTPS URLs or root-relative paths for your own files.

Step 4: Fix plugins and third-party embeds

Outdated plugins or embeds may load HTTP resources. Update them, find alternatives or check whether the provider supports HTTPS. Almost all reputable services do.

Step 5: Update site settings

Make sure your CMS site URL settings use HTTPS. In WordPress, both the WordPress Address and Site Address should start with https.

Step 6: Add a Content Security Policy upgrade rule

The CSP directive "upgrade-insecure-requests" tells browsers to request HTTP resources over HTTPS automatically. It's a helpful safety net, but fix the source URLs too, because the rule only works if resources are available over HTTPS. Our guide to website security headers explains CSP in more detail.

Step 7: Force HTTPS for the whole site

Redirect all HTTP requests to HTTPS with a single, clear rule at the server, host or CDN level. Be careful not to create loops; see our guide to fixing "too many redirects".

Step 8: Clear caches and retest

Purge caching plugins, server caches and CDNs, then retest in a private window. Check the padlock and console on key pages.

Don't forget

  • Canonical tags and sitemaps should use HTTPS URLs.
  • Update links in email templates and social profiles.
  • Update Google Search Console and analytics settings.
  • Turn on HSTS once everything works over HTTPS.

Prevention

  • Use HTTPS or relative URLs for all new content.
  • Check new plugins and embeds for HTTPS support.
  • Run periodic scans for mixed content.

Finding mixed content across a large site

On sites with hundreds or thousands of pages, checking each page manually isn't practical. Use a site crawler that reports insecure resources, or search your database and code for "http://" references to your own domain and third-party services. Prioritise templates and global elements like headers, footers and scripts, since fixing them resolves issues across many pages.

Mixed content in emails and documents

Email templates, PDFs and downloadable documents may also reference HTTP links to your site. Update them so customers don't land on insecure pages or see warnings after clicking.

Third-party services that don't support HTTPS

If an old service only works over HTTP, it's a strong sign it's outdated and potentially insecure. Look for a modern alternative, or host the resource yourself over HTTPS where licensing allows.

Monitoring after the fix

Add mixed content checks to your launch checklist and periodic site audits. New content, embeds and plugins can reintroduce insecure resources over time. Browser developer tools and online scanners make regular checks quick.

Search engines and HTTPS

After fixing mixed content, check that search engines index the HTTPS versions of pages, with canonical tags and sitemaps updated.

How we help

Our maintenance and support team fixes mixed content and HTTPS issues, our web development team handles HTTPS migrations end to end, and our CMS development team cleans up content and plugins safely.

Frequently asked questions

What is mixed content?

Insecure HTTP resources such as images or scripts loaded on a secure HTTPS page.

Does mixed content affect SEO?

Indirectly. Security warnings and broken pages hurt user experience and trust.

Can a plugin fix mixed content automatically?

Plugins can rewrite URLs on the fly, but fixing URLs at the source is cleaner and more reliable.

This guide is general information, not legal, tax or financial advice, and details such as prices, features and rules can change. Product and company names mentioned are trademarks of their respective owners and are used only to identify those products; UK Technology Hub is not affiliated with or endorsed by them.

Related guides

How to fix the WordPress white screen of death

A calm, step-by-step guide to diagnosing and fixing a blank white WordPress page, from recovery mode and debug logs to plugins, themes and memory limits.

All bug fixes & troubleshooting guides