Your site loads resources over insecure HTTP, exposing users to man-in-the-middle attacks and blocking access to modern browser APIs.
Lighthouse detects network requests using http:// instead of https://. This happens when your HTML references assets with explicit HTTP URLs, protocol-relative URLs that resolve to HTTP, or when third-party resources lack HTTPS support. Mixed content—loading HTTP resources on an HTTPS page—triggers browser warnings and can be blocked entirely.
HTTPS prevents attackers from intercepting or modifying data between your server and users. Beyond security, it's a prerequisite for HTTP/2, Service Workers, geolocation, camera access, and most modern web platform APIs.
mixed-content:displayed or mixed-content:blockableMixed content appears in the Console as:
Mixed Content: The page at 'https://example.com' was loaded over HTTPS,
but requested an insecure resource 'http://cdn.example.com/script.js'.
This request has been blocked; the content must be served over HTTPS.
Find and replace HTTP references in your codebase.
<!-- Before -->
<script src="http://cdn.example.com/lib.js"></script>
<img src="http://images.example.com/photo.jpg">
<link href="http://fonts.googleapis.com/css?family=Roboto">
<!-- After -->
<script src="https://cdn.example.com/lib.js"></script>
<img src="https://images.example.com/photo.jpg">
<link href="https://fonts.googleapis.com/css?family=Roboto">
For URLs in JavaScript:
// Before
const API_URL = 'http://api.example.com'
// After
const API_URL = 'https://api.example.com'
Use protocol-relative URLs only if you still need HTTP support (rare):
<!-- Works on both HTTP and HTTPS, but prefer explicit HTTPS -->
<script src="//cdn.example.com/lib.js"></script>
Enforce HTTPS at the browser level with CSP headers:
Content-Security-Policy: upgrade-insecure-requests
This tells browsers to automatically upgrade HTTP requests to HTTPS. Configure it on your server:
add_header Content-Security-Policy "upgrade-insecure-requests" always;
// Vercel/Next.js - next.config.js
module.exports = {
headers: async () => [{
source: '/(.*)',
headers: [{
key: 'Content-Security-Policy',
value: 'upgrade-insecure-requests'
}]
}]
}
// Nuxt - nuxt.config.ts
export default defineNuxtConfig({
routeRules: {
'/**': {
headers: {
'Content-Security-Policy': 'upgrade-insecure-requests'
}
}
}
})
If a third-party service doesn't support HTTPS:
// Proxying an insecure API through your backend
// /api/proxy-legacy.js
export default async function handler(req, res) {
const data = await fetch('http://legacy-api.example.com/data')
res.json(await data.json())
}
mixed-content:all—should return no resultsupgrade-insecure-requests as a safety net./* Check your CSS files for http:// URLs */
background: url(http://example.com/bg.png);
HTTPS issues often appear alongside:
Mixed content issues often hide on less-visited pages—embedded videos on blog posts, legacy image galleries, or user-generated content. Scan your entire site to catch every insecure request before users encounter browser warnings.