The armored truck with one unlocked leg
Watch it happen
A secure page asks for a script over plain HTTP. Where the browser lets it load (modern ones block it), Mallory on the open road swaps it and Alice’s browser runs it.
Alice opens the bank’s page. It arrives in a locked armored truck (HTTPS), so nobody on the road can look inside.
In bank terms and app terms
| In the bank | In your app |
|---|---|
http:// (readable and changeable) | |
Are you exposed?
Your HTML, CSS or JS contains hard-coded http://URLs for scripts, images, fonts or API calls.The browser console shows a “Mixed Content” warning or error for an http://resource on yourhttps://page.You copied an old embed snippet or CDN link that starts with http://.
Change every http://resource URL tohttps://, or use relative paths on your own domain like/img/logo.png.Add Strict-Transport-Securityand consider the CSP directiveupgrade-insecure-requests.Check the browser console on each key page and fix any mixed content warnings before you ship.
Ask your AI tool to fix it
Paste this into Cursor, Claude, Lovable, Bolt or whatever you build with.
Search this codebase, including HTML, CSS, JS/TS, env files and config, for any resource or API URL that starts with http://. Replace each with https:// or a relative path. If a third-party host does not support HTTPS, tell me and suggest an alternative. Then add the Strict-Transport-Security header and the CSP directive upgrade-insecure-requests.Where this comes from
The facts, figures and fixes on this page were checked against these sources on 25 Oct 2026. They are linked so you can check for yourself.
- Mixed contentMDN Web DocsHTTP scripts on HTTPS pages can be swapped on the network; modern browsers block them
- upgrade-insecure-requests (CSP directive)MDN Web DocsDirective upgrades http:// subresources to https://; does not replace HSTS
- Strict-Transport-Security headerMDN Web DocsHSTS makes the browser use HTTPS for future requests to the host
- Mixed ContentW3CSpec: blockable content like scripts is blocked; images/media are auto-upgraded
- What is mixed content?web.devActive mixed content is blocked; DevTools reports warnings; Chrome auto-upgrades
Spot a mistake or something out of date? Report a correction · How these guides are made and checked
The free, open-source scanner checks for most of the problems in these guides.