Use when checking whether a web server is configured to redirect all HTTP traffic to HTTPS.
Pro scans all 2 files and shows the line behind each finding
Scanned 10/5/2026
npx -y skills add thedaviddias/Front-End-Checklist --skill http-to-https --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Http To Https?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/thedaviddias-http-to-https)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: http-to-https
description: "Use when checking whether a web server is configured to redirect all HTTP traffic to HTTPS."
metadata:
category: security
priority: critical
difficulty: beginner
estimatedTime: "10"
source: frontendchecklist.io
url: https://frontendchecklist.io/rules/security/http-to-https
---
# Redirect HTTP to HTTPS
Without an HTTP-to-HTTPS redirect, users who type the domain without `https://` or follow old links land on the insecure version of the site, exposing session cookies and form data to network attackers.
## Quick Reference
- Redirect `http://example.com` to `https://example.com` with HTTP 301 (permanent redirect)
- Preserve the full path and query string in the redirect: `https://$host$request_uri`
- Use 301 (not 302) so browsers and search engines cache the redirect and future requests go directly to HTTPS
- Configure redirects at the server/CDN level — never rely on client-side JavaScript for security redirects
- After validating HTTPS works, add HSTS to eliminate future HTTP requests entirely
## Check
Test whether http://example.com redirects to https://example.com with a 301 status code. Check that the full URL path and query string are preserved in the redirect Location header.
## Fix
Configure the web server to redirect all HTTP requests to HTTPS with a 301 status code, preserving the full request path. Verify the redirect with curl -I http://example.com.
## Explain
Explain why redirecting HTTP to HTTPS is necessary, the difference between 301 and 302 redirects, and how HSTS can eliminate the redirect for returning users.
## Code Review
Review server config, headers, forms, and integration points related to Redirect HTTP to HTTPS. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
---
For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.
Rule page: https://frontendchecklist.io/rules/security/http-to-https
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!