Fix mixed content errors on an HTTPS page
An HTTPS page can still request files over HTTP. Browsers may upgrade those requests or block them, leaving an image missing or part of the page broken.
Find the HTTP requests behind a mixed content error
Files loaded over HTTP
A script, stylesheet or image can still have an insecure address even when the page itself uses HTTPS.
Forms sent over HTTP
An insecure form destination can send what visitors type without encryption.
The mixed content guide explains browser handling; a form's action attribute sets its submission destination.
Replace each http:// address the browser console reports
- 1
Locate the request
Open the browser console on the affected page and find the resource named in the mixed content warning.
- 2
Replace the insecure reference
Confirm the resource works over HTTPS, update the address where the page gets it, then reload and check for remaining warnings.
What does upgrade-insecure-requests do for mixed content?
The Content Security Policy directive upgrade-insecure-requests tells the browser to try HTTPS for insecure resource addresses. If the HTTPS resource isn't available, the request fails without falling back to HTTP. It doesn't replace HSTS, because it doesn't upgrade a visit that arrives from an http:// link on another site. MDN explains the directive.
Frequently asked questions
Why does my site say not secure even with HTTPS?
A form on an HTTPS page that sends to an http:// address can trigger a warning that the form isn't secure. Chrome shows that warning as visitors start filling the form in, and a full-page warning before it sends. Point the form's action at an https:// address. Chrome's announcement describes both warnings.
Follow up mixed content errors with HTTPS and HSTS checks
Domain health
Fix the setup mistakes that make browsers warn people away from your site.
HTTP to HTTPS redirect
Send HTTP requests to their HTTPS destination and avoid conflicting redirect rules.
HSTS
Understand how browsers remember HTTPS before extending that rule to every subdomain.