Skip to content
Skillpedia
Security75k · #2876

http-to-https

What it does

This skill checks that a web server sends plain HTTP visits to the secure HTTPS address. It is for site owners and developers who run websites.

When to use it

  • ✓When visitors type your domain without https and land on the insecure version.
  • ✓When old links still point to plain http addresses.
  • ✓When you set up a new server or hosting provider.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/http-to-https/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/http-to-https/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you make sure my website redirects all http visits to https?”

5 new skills a week. 1 minute to read.

How it works

The agent checks that the plain address responds with a 301 redirect to the matching HTTPS address, keeping the full path. It suggests setting this at the server or CDN level and testing it with a command-line request.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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

FAQ

Why 301 instead of 302?

The skill says 301 is permanent, so browsers and search engines cache it and go straight to HTTPS in future.

Should the redirect be done in JavaScript?

No. The skill says security redirects should be configured on the server or CDN, not in client-side code.

What comes after the redirect is set up?

The skill suggests adding HSTS to stop future plain HTTP requests.

Details

Original description by the author

Use when checking whether a web server is configured to redirect all HTTP traffic to HTTPS.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#2876
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills