Skip to content

My app does not redirect HTTP to HTTPS. How do I fix it?

Short answer

Short answer: enable HTTPS at the hosting layer, redirect HTTP requests to the canonical secure origin, and update links that still use plain HTTP. This guide explains what to verify and what the public scan cannot prove, without logging in, changing records, or treating an inconclusive response as a pass.

Check yours now
Read-only. No writes or row contents.

What the app without an HTTP to HTTPS redirect check covers

An HTTP endpoint can expose traffic to interception before the browser reaches a secure page. The exact impact depends on what is served over HTTP and whether the host already enforces HTTPS upstream.

The finding describes a public condition, not proof that someone has abused it. First preserve the relevant deployment details, then rotate exposed credentials or close the access path before investigating billing, logs, or affected records.

Check both the apex and www hosts, plus the final destination after each redirect. A secure homepage does not guarantee that images, API calls, or older deep links avoid HTTP.

Understand the evidence before changing code

Enable the provider's HTTPS setting and configure a permanent redirect at the edge or web server. Avoid redirect loops by trusting only the host's documented forwarded-protocol header.

Severity reflects potential impact and reach, not certainty of exploitation. A public key can be intentionally visible; the important distinction is what the provider allows that key to do and which server-side policy still applies.

Apply the narrow, safe change

Update canonical URLs, API base URLs, asset links, and OAuth callback settings to use HTTPS. HSTS can strengthen the browser policy after HTTPS is reliable across every required subdomain.

HTTP to HTTPS redirect · nginx
server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://example.com$request_uri;
}

Prefer the smallest repair that restores the intended boundary. Keep public client configuration public, move privileged operations behind an authenticated server route, and make data rules depend on the authenticated owner or an explicit role.

Verify the production result

Test a plain HTTP request and verify one redirect reaches the correct HTTPS URL. Inspect the final page for mixed-content warnings and test authentication or checkout callbacks.

Use the snippet as a starting point, not a blind migration. Confirm the real table, environment, route, identity claim, and deployment platform first; a copied policy with the wrong owner field can block legitimate users or expose the wrong records.

Keep the issue from returning

Add an automated check for HTTP responses and mixed-content references. Confirm staging and custom domains use valid certificates before enforcing a long-lived HSTS policy.

Verify the repair from the same public vantage point that exposed it. Check the deployed response, confirm the finding is gone, and test the intended signed-in user and an unrelated user through the normal application flow.

Limits and next steps

A redirect check cannot assess certificate ownership, TLS configuration, or every third-party resource. Review those separately and avoid enabling HSTS preload without understanding its scope.

Prevent recurrence with a reviewed migration, a secret scanner, and a small regression test that runs before deploy. Store only the minimum required credential, scope it to one project, and define who can rotate it.

A public scanner cannot establish whether private records were accessed or whether an account was compromised. If a real secret shipped, revoke it with the provider and review the provider's usage and audit history.

Key facts

  • HTTP redirects should preserve the path and query where appropriate.
  • HSTS is a browser policy and should follow reliable HTTPS deployment.
  • Mixed content can remain even when the homepage redirects correctly.

Questions

Can a clean app without an HTTP to HTTPS redirect check prove the app is secure?
No. It is evidence about the advertised public surface only. The host may already redirect upstream; test the public HTTP URL and every hostname.
What should I do first if the finding is real?
Configure the host-level redirect, update HTTP links, and confirm valid TLS.
Does ProofForge change application data?
No. The scan is read-only and does not sign in, write records, or use a discovered secret. You make and review any remediation in your own project.
What should I do after the repair?
Check both host variants, deep links, and browser mixed-content warnings.

Official documentation referenced

Related

Last updated 2026-11-25 · Reviewed by ProofForge · Methodology · Markdown