Langsung ke konten
Skillpedia
Keamanan75k · #2876

http-to-https

Fungsinya

Skill ini memeriksa bahwa server web mengalihkan kunjungan HTTP biasa ke alamat HTTPS yang aman. Skill ini cocok untuk pemilik dan developer situs web.

Kapan dipakai

  • ✓Saat pengunjung mengetik domain Anda tanpa https dan sampai di versi yang tidak aman.
  • ✓Saat tautan lama masih mengarah ke alamat http biasa.
  • ✓Saat Anda mengatur server atau penyedia hosting baru.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/http-to-https/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Bisakah Anda memastikan situs web saya mengalihkan semua kunjungan http ke https?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent memeriksa bahwa alamat HTTP biasa merespons dengan pengalihan 301 ke alamat HTTPS yang sesuai, dengan mempertahankan seluruh path. Agent menyarankan pengaturan ini di tingkat server atau CDN dan mengujinya dengan permintaan baris perintah.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

Pertanyaan umum

Mengapa 301 dan bukan 302?

Skill menyatakan 301 bersifat permanen, sehingga browser dan mesin pencari menyimpannya dan langsung menuju HTTPS di masa depan.

Apakah pengalihan boleh dilakukan dengan JavaScript?

Tidak. Skill menyatakan pengalihan keamanan sebaiknya diatur di server atau CDN, bukan di kode sisi klien.

Apa yang dilakukan setelah pengalihan diatur?

Skill menyarankan menambahkan HSTS untuk menghentikan permintaan HTTP biasa di masa depan.

Detail

Deskripsi asli dari pembuat

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

repo: thedaviddias/Front-End-Checklist

Popularitas

Bintang GitHub
75k
Peringkat
#2876
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa