Home / Fix guides / Mixed content
Fix mixed content (http:// resources on an https:// page)
Medium
Your HTTPS page references resources over plain http://. Browsers block insecure scripts and frames (breaking your app) and warn on insecure images.
Why it matters
Anything loaded over HTTP can be modified in transit; an insecure script means full control of the page.
Quick fix
- Change the listed http:// URLs to https://.
- If a resource has no HTTPS version, host it yourself.
- Optionally add upgrade-insecure-requests to your CSP.
Step by step
Fix the URLs
Search your code for 'http://' and switch to https://. As a safety net add this CSP directive:
Content-Security-Policy: upgrade-insecure-requestsPrompt for your AI builder
Paste this into Lovable, Bolt, v0, Cursor or Replit, then review the changes before deploying.
Find every http:// URL loaded by my app (scripts, styles, images, iframes, fonts, form actions, API calls) and change it to https://. Add the CSP directive upgrade-insecure-requests.