Guides · HTTPS and certificate
Mixed content
One of the checks in every audibot report. This page says exactly what audibot reads, what passes, and how to fix it.
What audibot checks
The src of every <script>, <img> and <iframe>, and the href of every <link rel="stylesheet">, in the HTML the server sends. Any that starts with http:// is mixed content. Resources added later by JavaScript, srcset and CSS url() are not read. Skipped when robots.txt asks crawlers to stay off the home page.
- Pass
Every one of those resources is requested over HTTPS.
- Fail
At least one loads over plain HTTP; the report gives the first.
Why it matters
Browsers block scripts, stylesheets and frames loaded over HTTP on an HTTPS page, which breaks the page; images are upgraded or shown with a warning. Whatever loads over HTTP can be read or replaced in transit.
How do I fix mixed content warnings?
Change each http:// URL to https://, or to a root-relative path for your own files. The CSP directive upgrade-insecure-requests makes browsers upgrade them automatically, but the markup still says http://, so fix the source as well.
Before and after
<script src="http://cdn.example.com/app.js"></script>
<script src="https://cdn.example.com/app.js"></script>Find them in a codebase
grep -rnE '(src|href)="http://' .Browser-side safety net
Content-Security-Policy: upgrade-insecure-requestsRelated tools
- SSL certificate checker — Check certificate validity and expiry, HTTPS redirects and other TLS findings.
Other checks in HTTPS and certificate
HTTPS and certificate in the methodology ·All guides
This check is one step of the website launch checklist.
Check your site
audibot runs this check and every other one in a single audit, and publishes the report with a recommendation for each finding.