How to fix: Plain HTTP Does Not Redirect to HTTPS
Async check: for an http:// target, opens a raw connection to :80 with redirect-following disabled and inspects only the first response. Reports when the server answers directly (or redirects to a non-HTTPS location) instead of redirecting straight to HTTPS.
Why it matters
A client that reaches the site over plain HTTP, via an old bookmark, a typed URL without a scheme, or a link that omits https://, is served in cleartext instead of being moved onto an encrypted connection, exposing that traffic to on-path tampering and interception.
A correctly configured site's :80 listener should do nothing except redirect every request to the https:// equivalent of the same URL. Serving content directly on :80, or redirecting to another plain-HTTP URL, leaves plaintext traffic reachable even when HTTPS is available.
How to fix it
- 1Configure the :80 listener to issue a 301 redirect to the https:// version of the same path, and serve no other content on that port.
- 2Enable HSTS on the HTTPS listener once the redirect is in place so returning clients skip the plaintext hop entirely.
Code examples
Nginx: HTTP redirect only
server {
listen 80;
server_name example.com;
return 301 https://$host$request_uri;
}References
Detected automatically by VulnRadar. The check id is tls-http-no-https-upgrade, stable across every scan so you can filter or diff on it.
More tls checks
Questions
- How severe is Plain HTTP Does Not Redirect to HTTPS?
- VulnRadar rates this medium severity in the tls 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 tls-http-no-https-upgrade, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Plain HTTP Does Not Redirect to HTTPS 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.