How to fix: Resource hint on an HTTPS page targets a cleartext URL
An HTTPS page contains a link element resource hint whose href is a cleartext http URL. The relation is one of preload, modulepreload, preconnect, prefetch, dns-prefetch, prerender or manifest.
Why it matters
preconnect and dns-prefetch to an http:// origin leak the destination hostname to the network before any content is requested, and warm a connection the browser then cannot use. preload and modulepreload of an http:// script or style are active mixed content, so the fetch is blocked and whatever depended on it fails. A cleartext manifest link means the installed web app's own metadata can be rewritten in transit.
Separate from the classic mixed-content checks, which read src on media and script elements and href on stylesheet links: hint relations are a different set of rel values and are usually added by a performance pass rather than by the code that renders the resource. That is why they lag behind an HTTPS migration. The risk varies by relation, hence the Low rating, but every case is either a leak or a broken fetch.
How to fix it
- 1Rewrite the href values to https, or to root-relative paths for same-origin resources.
- 2Delete hints that point at hosts the page no longer uses, which is common after a CDN change.
- 3Add upgrade-insecure-requests to the CSP as a safety net.
Code examples
Hints over HTTPS
<link rel="preconnect" href="https://cdn.example.com" crossorigin>
<link rel="preload" href="/fonts/inter.woff2" as="font" type="font/woff2" crossorigin>
<link rel="manifest" href="/site.webmanifest">Find cleartext hints in a template tree
grep -rn 'rel="\(preload\|preconnect\|prefetch\|dns-prefetch\|manifest\)"' \
--include='*.html' . | grep 'http://'References
Detected automatically by VulnRadar. The check id is ssl-http-resource-hint-tag, stable across every scan so you can filter or diff on it.
More ssl checks
- HighSecure Cookie Set on HTTP Endpoint
- CriticalSite Served Over Unencrypted HTTP
- InfoExpect-CT Header Not Present
- LowHTTPS Served on Non-Standard Port
- InfoX-HTTP-Method-Override / X-Forwarded-Method Header in Response
- InfoHSTS Present on HTTP Response (SSL-Strip Indicator)
- MediumMixed-Protocol Content (HTTPS Page Loading HTTP Resources)
- LowHSTS declared in a meta tag, where browsers ignore it
Questions
- How severe is Resource hint on an HTTPS page targets a cleartext URL?
- VulnRadar rates this low severity in the ssl category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id ssl-http-resource-hint-tag, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Resource hint on an HTTPS page targets a cleartext URL map to?
- It maps to CWE-319. In the OWASP Top 10 it falls under A02:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.