Key takeaways

  • Mixed content means an HTTPS page still loads some files over HTTP. Browsers block scripts, stylesheets and iframes loaded that way.
  • On WordPress, old http:// URLs hide in post content, options, widgets, page builder data, theme files and plugin settings.
  • Find them in the browser console, with a crawl and with a dry run of WP-CLI search-replace before you change anything.
  • Fix the source, not just the symptom. The upgrade-insecure-requests header is a safety net, not a clean-up.
  • Redirects, canonicals, internal links and sitemaps should all point to HTTPS, or the move is only half done.

WordPress mixed content is one of the most common leftovers I find after a site moves to HTTPS. The certificate works, the padlock shows on the home page, and everyone moves on. Months later a contact form stops working on some pages, a slider has no styles, or the browser marks a blog post as not secure. Cleaning that up properly is a standard part of my WordPress SEO consulting work.

This article is about finding and fixing the HTTP leftovers on a WordPress site. If your question is whether HTTPS itself helps rankings, I answered that separately in is HTTPS still a Google ranking signal.

I first published this article in 2025 and have rewritten it, removing statistics and claims I could not trace to any source.

What mixed content is and why browsers care

web.dev’s explanation of what mixed content is starts simply: “A page has mixed content when its initial HTML is loaded over a secure HTTPS connection,” while other resources on the page are loaded over HTTP. It then splits those resources into two kinds.

A secure web page with a padlock receiving files along several lines, where image lines pass through and one script line is stopped by a barrier
Figure 1. Browsers upgrade or allow some insecure files, such as images, and block others, such as scripts and stylesheets.
  • Passive mixed content, “including images, video, and audio, doesn’t interact with the rest of the page”.
  • Active mixed content “interacts with the page as a whole. This includes scripts, stylesheets, iframes, and any other code the browser can download and execute.”

The same page says “Most browsers now block mixed content for security reasons,” and that Chrome in some cases upgrades passive mixed content to HTTPS automatically. “If there’s no secure version, the asset doesn’t load.” It also notes that with passive mixed content present, “most browsers indicate in the address bar that the page isn’t secure.”

For SEO, the practical point is this. A blocked stylesheet or script is missing for visitors, and the page may also render differently when Google processes it. A broken layout, a missing menu or a form that never loads are the problems that matter, more than the warning itself.

Where WordPress keeps old HTTP links

WordPress stores many URLs as full addresses, including the protocol. When a site moves to HTTPS, changing the two addresses in Settings, General fixes the URLs WordPress builds itself. It does not touch the URLs already saved elsewhere. In audits I usually find them in these places:

  • post and page content, especially images and links added before the move;
  • custom fields and page builder data, often stored as serialized arrays;
  • widgets, menus and Customizer settings, such as a logo or background image;
  • CSS files generated by a page builder or theme, which keep the old URLs until they are rebuilt;
  • theme template files and functions.php with hard-coded http:// links;
  • plugin settings, such as a form plugin’s script or a tracking snippet pasted years ago;
  • third-party embeds, such as an old map, video or booking widget that only offered HTTP.

Each of these needs a different fix, so I find them all before changing anything.

Free tool · Ping My URL

Cleaned up mixed content on your key pages? Let search engines know the URLs changed.

Notify Google and other search engines about up to 5 new or updated URLs at once. Free, no sign-up.

Ping your URLs →

How to find WordPress mixed content

web.dev’s guide to fixing mixed content says “the browser alerts you to mixed content as errors and warnings in the JavaScript console.” That is the first check, and it is quick: open a page, open the developer tools, reload and read the console. Do it for one page of each template, not just the home page.

The console only shows the page you are on. For the rest of the site I use three more checks:

  1. A crawl of the site that reports any http:// resource on HTTPS pages.
  2. A database search. The WP-CLI search-replace command has a –dry-run option that will “Run the entire search/replace operation and show report, but don’t save changes to the database.” It shows how many http:// references each table holds without changing them.
  3. A report-only policy. web.dev notes “You can use content security policy to collect reports of mixed content on your site,” using the Content-Security-Policy-Report-Only header, which reports problems without blocking anything.
A magnifying glass over a stack of database tables, with a few rows highlighted in coral next to a browser console panel listing warning marks
Figure 2. Search the database and the browser console before changing anything, so every source of old URLs is on the list.

Look for references to your own domain first, since those are the easiest to fix. Then list the external http:// resources separately.

Fixing it without breaking the site

Take a full backup first, and if you can, run the change on a staging copy. Then work from the database outwards.

Database content

The WP-CLI command is the safest tool I know for this, because, as its documentation says, it “intelligently handles PHP serialized data, and does not change primary key values.” A plain SQL find and replace can break serialized data when the length of a string changes. I replace the full old address with the full new one, for example http://example.com with https://example.com, rather than every http:// on the site. I also leave the guid column alone, using the command’s –skip-columns option, because it is an identifier rather than a link people follow.

Generated files, theme and plugins

After the database change, rebuild any CSS files your page builder or theme generates, and clear the page cache and the CDN cache. Then search the theme and any custom plugin code for hard-coded http:// links and change them.

External resources

For files on other domains, web.dev suggests checking whether the resource is available over HTTPS by changing the address in the browser. If it is, “you can safely change the http:// URL for the resource in your code to https://.” If not, the options are to host it yourself “if you are legally allowed to do so”, load it from another host, or remove it.

Free tool · SEO ROI Calculator

Fixing a broken form or a page that lost its styles? Estimate what the keywords those pages rank for are worth to you.

Enter search volume, CPC and your current ranking to estimate traffic, revenue and value for a keyword. Free.

Calculate your SEO ROI →

Redirects, canonicals and the proxy redirect loop

Mixed content is one half of an HTTPS move. The other half is telling search engines which version is real. web.dev’s guide to enabling HTTPS says to “Use 301 (Moved Permanently) to indicate to search engines and browsers that the HTTPS version is canonical,” and that “Ultimately you should redirect HTTP requests to HTTPS and use HTTP Strict Transport Security (HSTS).”

Google’s guide to site moves with URL changes lists HTTP to HTTPS as one of the URL changes it covers. It says “Use server side permanent redirects if technically possible,” to “Change the internal links on the new site from the old URLs to the new URLs,” and that each new URL should have a self-referencing canonical tag.

Item What it should show Common WordPress miss
Redirect One 301 from each http:// URL to its https:// version Chains through www and non-www, or a plugin redirect on top of a server redirect
Canonical tag The https:// URL of the page itself A hard-coded canonical in the theme still on http://
Internal links https:// or relative links Old links in post content and menus
XML sitemap Only https:// URLs A static sitemap file left from the old set-up
HSTS header Strict-Transport-Security, set once HTTPS works everywhere A long max-age switched on before subdomains were ready

On HSTS, web.dev advises: “You can start with low values and gradually increase the max-age”. That is good advice on any site with subdomains you have not checked.

The reverse proxy loop

Many WordPress sites sit behind a load balancer or CDN that handles HTTPS. WordPress then sees a plain HTTP request, and forcing HTTPS creates a redirect loop. The WordPress documentation on HTTPS for WordPress describes this case: when “WordPress is hosted behind a reverse proxy that provides SSL, but is hosted itself without SSL,” it can loop, and WordPress should read the HTTP_X_FORWARDED_PROTO header if the proxy sets it. In my experience the same mismatch also makes some plugins build http:// URLs, which brings the mixed content back.

A server, a proxy box and a web page joined by a loop of arrows that is cut and straightened into a single arrow with a padlock
Figure 3. Behind a proxy, WordPress must know the visitor arrived over HTTPS, or redirects loop and plugins build http links.

Keeping WordPress mixed content from coming back

The upgrade-insecure-requests directive “instructs the browser to upgrade insecure URLs before making network requests,” according to web.dev. It is a useful safety net. It is not a fix: the old URLs are still in your database and code, and a resource that has no HTTPS version still fails.

Mixed content is rarely one big mistake; it is a hundred small old links, and they come back unless someone checks.

What keeps it clean is routine. I check the console on each main template after theme or plugin updates, I keep the report-only policy running if the site has one, and I ask editors to upload images to the media library instead of pasting addresses from other sites.

Rank Check Reports

Moved to HTTPS or cleaned up after a move? Check your keywords on desktop and mobile in one live Google check and keep the report for comparison.

A live Google check of your keywords on desktop and mobile · from $14.99 per check · no subscription · report within one working day

Order a rank check report →

FAQ

Does mixed content hurt rankings in Google?

I have not seen Google say it penalises mixed content directly. The real risk is what blocked files do: missing styles, scripts or forms change what visitors and Google get on the page. Fix it for that reason.

Will a plugin that forces HTTPS fix mixed content?

It can hide much of it by rewriting URLs as pages load. The old addresses stay in the database and code, so I prefer to fix the source and use such a plugin, if at all, only as a temporary bridge.

Why do I still see mixed content after a search and replace?

Usually because of generated CSS files, caches, hard-coded theme or plugin URLs, or external resources. Rebuild generated files, clear every cache, and check the console again.

Should I use protocol-relative URLs like //example.com?

web.dev recommends making intra-site URLs as relative as possible. Once the whole site runs on HTTPS, plain https:// URLs or relative paths are the clearest choice.

Eugen Platon

Eugen Platon

Director of SEO & Web Analytics at onwardSEO
Eugen Platon is a highly experienced SEO expert with 16+ years of experience propelling organizations to the summit of digital popularity. Eugen, who holds a Master's Certification in SEO and is well-known as a digital marketing expert, has a track record of using analytical skills to maximize return on investment through smart SEO operations. His passion is not simply increasing visibility, but also creating meaningful interaction, leads, and conversions via organic search channels. Eugen's knowledge goes far beyond traditional limits, embracing a wide range of businesses where competition is severe and the stakes are great. He has shown remarkable talent in achieving top keyword ranks in the highly competitive industries of gambling, car insurance, and events, demonstrating his ability to traverse the complexities of SEO in markets where every click matters. In addition to his success in these areas, Eugen improved rankings and dominated organic search in competitive niches like "event hire" and "tool hire" industries in the UK market, confirming his status as an SEO expert. His strategic approach and innovative strategies have been successful in these many domains, demonstrating his versatility and adaptability. Eugen's path through the digital marketing landscape has been distinguished by an unwavering pursuit of excellence in some of the most competitive businesses, such as antivirus and internet protection, dating, travel, R&D credits, and stock images. His SEO expertise goes beyond merely obtaining top keyword rankings; it also includes building long-term growth and optimizing visibility in markets where being noticed is key. Eugen's extensive SEO knowledge and experience make him an ideal asset to any project, whether navigating the complexity of the event hiring sector, revolutionizing tool hire business methods, or managing campaigns in online gambling and car insurance. With Eugen in charge of your SEO strategy, expect to see dramatic growth and unprecedented digital success.
Eugen Platon
Check my Online CV page here: Eugen Platon SEO Expert - Online CV.