-
Notifications
You must be signed in to change notification settings - Fork 1
Add guide for enabling HTTPS on different platforms #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| Untuk mengaktifkan HTTPS (SSL) pada website Anda, langkah-langkahnya sangat bergantung pada **di mana** website Anda di-hosting. Berikut adalah panduan berdasarkan skenario yang paling umum: | ||
|
|
||
| ### 1. Jika Menggunakan Shared Hosting (cPanel / DirectAdmin) | ||
| Sebagian besar penyedia hosting modern menyediakan SSL gratis (Let's Encrypt). | ||
|
|
||
| * **Login ke cPanel.** | ||
| * Cari menu **"SSL/TLS Status"** atau **"Let's Encrypt"**. | ||
| * Pilih domain/subdomain yang ingin diamankan. | ||
| * Klik tombol **"Run AutoSSL"** atau **"Issue"**. | ||
| * Tunggu beberapa menit hingga status berubah menjadi hijau/valid. | ||
| * *Opsional:* Aktifkan **"Force HTTPS Redirect"** di menu "Domains" atau melalui file `.htaccess` agar pengunjung otomatis dialihkan dari HTTP ke HTTPS. | ||
|
|
||
| ### 2. Jika Menggunakan WordPress | ||
| Setelah SSL terinstal di server/hosting: | ||
|
|
||
| * Install plugin **Really Simple SSL** atau **WP Force SSL**. | ||
| * Aktifkan plugin tersebut → klik **"Go ahead, activate SSL"**. | ||
| * Plugin akan otomatis menangani redirect dan memperbaiki mixed content. | ||
| * *Alternatif Manual:* Ubah URL di **Settings > General** dari `http://` menjadi `https://` (lakukan backup database terlebih dahulu!). | ||
|
|
||
| ### 3. Jika Menggunakan Cloudflare | ||
| Cloudflare menyediakan SSL gratis tanpa perlu instalasi di server origin: | ||
|
|
||
| * Login ke dashboard Cloudflare → pilih domain. | ||
| * Masuk ke menu **SSL/TLS > Overview**. | ||
| * Pilih mode **Full** atau **Full (Strict)** (jangan gunakan "Flexible" untuk produksi karena kurang aman). | ||
|
Sazwanismail marked this conversation as resolved.
|
||
| * Aktifkan **"Always Use HTTPS"** di tab Edge Certificates. | ||
| * Pastikan sertifikat Universal SSL sudah aktif (biasanya otomatis dalam 15 menit). | ||
|
|
||
| ### 4. Jika Menggunakan VPS / Server Sendiri (Nginx/Apache) | ||
| Gunakan **Certbot** untuk mendapatkan sertifikat Let's Encrypt gratis: | ||
|
|
||
| ```bash | ||
| # Install Certbot (contoh Ubuntu/Debian + Nginx) | ||
| sudo apt install certbot python3-certbot-nginx | ||
|
Sazwanismail marked this conversation as resolved.
|
||
|
|
||
| # Dapatkan & pasang sertifikat otomatis | ||
| sudo certbot --nginx -d example.com -d www.example.com | ||
|
|
||
| # Verifikasi auto-renewal | ||
| sudo certbot renew --dry-run | ||
| ``` | ||
|
|
||
| Untuk **Apache**: | ||
| ```bash | ||
| sudo apt install certbot python3-certbot-apache | ||
| sudo certbot --apache -d example.com | ||
| ``` | ||
|
|
||
| ### 5. Platform Lain | ||
| | Platform | Cara Aktivasi | | ||
| |---|---| | ||
| | **Netlify / Vercel** | Otomatis aktif, tidak perlu konfigurasi | | ||
| | **GitHub Pages** | Settings > Pages > Enforce HTTPS | | ||
| | **Blogger** | Settings > HTTPS > Redirect = Yes | | ||
| | **Shopify** | Otomatis, tunggu propagasi DNS | | ||
|
|
||
| --- | ||
|
|
||
| ### ⚠️ Checklist Setelah Aktivasi | ||
| 1. **Cek validitas:** Buka [whynopadlock.com](https://www.whynopadlock.com) atau klik ikon gembok di browser. | ||
| 2. **Fix Mixed Content:** Pastikan semua resource (gambar, CSS, JS) dimuat via `https://`, bukan `http://`. | ||
| 3. **Update Search Console:** Tambahkan properti HTTPS baru di Google Search Console. | ||
| 4. **Update internal links:** Ganti semua link hardcoded `http://` di konten/database. | ||
|
|
||
| --- | ||
|
|
||
| **Agar saya bisa memberikan panduan yang lebih spesifik, mohon informasikan:** | ||
| - Apa platform/hosting yang Anda gunakan? | ||
| - Apakah Anda sudah memiliki sertifikat SSL atau belum? | ||
| - Apakah ada pesan error tertentu yang muncul?Untuk mengaktifkan HTTPS (SSL) pada website Anda, langkah-langkahnya sangat bergantung pada **di mana** website Anda di-hosting. Berikut adalah panduan berdasarkan skenario yang paling umum: | ||
|
Sazwanismail marked this conversation as resolved.
|
||
|
|
||
| ### 1. Jika Menggunakan Shared Hosting (cPanel / DirectAdmin) | ||
| Sebagian besar penyedia hosting modern menyediakan SSL gratis (Let's Encrypt). | ||
| * **Login ke cPanel.** | ||
| * Cari menu **"SSL/TLS Status"** atau **"Let's Encrypt"**. | ||
| * Pilih domain Anda, lalu klik **"Run AutoSSL"** atau **"Issue"**. | ||
| * Tunggu beberapa menit hingga status berubah menjadi hijau/aktif. | ||
| * *Catatan:* Jika tidak ada opsi gratis, cek menu "Security" atau hubungi support hosting Anda untuk meminta SSL gratis. | ||
|
|
||
| ### 2. Jika Menggunakan Cloudflare | ||
| Cloudflare menyediakan SSL universal secara gratis dan otomatis. | ||
| * Login ke dashboard Cloudflare dan pilih domain. | ||
| * Masuk ke menu **SSL/TLS** > **Overview**. | ||
| * Ubah mode enkripsi menjadi **"Full"** atau **"Full (Strict)"** (jangan gunakan "Flexible" kecuali terpaksa, karena bisa menyebabkan redirect loop). | ||
| * Aktifkan **"Always Use HTTPS"** di tab *Edge Certificates*. | ||
|
|
||
| ### 3. Jika Menggunakan VPS / Server Sendiri (Nginx / Apache) | ||
| Gunakan **Certbot** (Let's Encrypt) untuk mendapatkan dan memasang sertifikat gratis secara otomatis. | ||
|
|
||
| **Untuk Nginx (Ubuntu/Debian):** | ||
| ```bash | ||
| sudo apt update | ||
| sudo apt install certbot python3-certbot-nginx | ||
| sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com | ||
| ``` | ||
|
|
||
| **Untuk Apache (Ubuntu/Debian):** | ||
| ```bash | ||
| sudo apt update | ||
| sudo apt install certbot python3-certbot-apache | ||
| sudo certbot --apache -d yourdomain.com -d www.yourdomain.com | ||
| ``` | ||
| *Certbot akan otomatis mengedit konfigurasi server dan mengatur auto-renewal.* | ||
|
|
||
| ### 4. Jika Menggunakan WordPress | ||
| Setelah SSL terpasang di level server/hosting: | ||
| * Install plugin **"Really Simple SSL"** atau **"WP Force SSL"**. | ||
| * Aktifkan plugin tersebut; ia akan otomatis memperbaiki mixed content dan memaksa semua halaman menggunakan HTTPS. | ||
| * Atau, ubah URL situs secara manual di **Settings > General** dari `http://` menjadi `https://`. | ||
|
|
||
| --- | ||
|
|
||
| ### ⚠️ Langkah Penting Setelah Aktivasi | ||
| 1. **Force Redirect HTTP ke HTTPS:** Pastikan semua trafik dialihkan. Di cPanel biasanya ada toggle "Force HTTPS". Di VPS, Certbot biasanya melakukannya otomatis. | ||
| 2. **Cek Mixed Content:** Buka website, tekan F12 > Console. Jika ada warning "Mixed Content", berarti masih ada gambar/script yang dimuat via HTTP. Perbaiki URL-nya menjadi HTTPS atau relatif (`//`). | ||
|
Sazwanismail marked this conversation as resolved.
|
||
| 3. **Update Google Search Console:** Jika situs sudah terdaftar, tambahkan properti versi HTTPS dan submit ulang sitemap. | ||
| 4. **Verifikasi:** Cek di [SSL Labs](https://www.ssllabs.com/ssltest/) untuk memastikan konfigurasi SSL Anda aman (target rating A atau A+). | ||
|
|
||
| --- | ||
|
|
||
| **Agar saya bisa memberikan instruksi yang lebih spesifik, mohon informasikan:** | ||
| * Apa penyedia hosting atau platform yang Anda gunakan? (contoh: Niagahoster, Hostinger, AWS, DigitalOcean, Blogger, dll.) | ||
| * Apakah Anda sudah memiliki sertifikat SSL atau belum?Ya, arahan anda adalah **tepat**. Berikut adalah ringkasan langkah tersebut dalam format yang lebih terperinci untuk memudahkan pelaksanaan di cPanel: | ||
|
|
||
| ### Langkah Mengaktifkan SSL Percuma di cPanel | ||
|
|
||
| 1. **Log masuk ke cPanel** hosting anda. | ||
| 2. Cari bahagian **SECURITY**, kemudian klik **"SSL/TLS Status"**. | ||
| * *Nota:* Sesetengah hosting meletakkan ikon ini sebagai **"Let's Encrypt SSL"** atau **"AutoSSL"**. Jika tidak jumpa "SSL/TLS Status", cari nama-nama alternatif ini. | ||
| 3. Tandakan kotak pada domain **`www.sazwan.fairbase.com`** (dan juga `sazwan.fairbase.com` tanpa www jika ada). | ||
| 4. Klik butang **"Run AutoSSL"** di bahagian atas. | ||
| 5. Tunggu proses selesai (biasanya 1-3 minit) sehingga ikon padlock berwarna **hijau** dan status tertulis *"The certificate is valid"*. | ||
|
|
||
| ### Selepas Aktivasi Berjaya | ||
|
|
||
| * ✅ Laman web akan boleh diakses melalui `https://www.sazwan.fairbase.com` | ||
| * ✅ Pelayar akan memaparkan ikon 🔒 (secure) | ||
| * ✅ Kebanyakan hosting moden akan **mengarah semula (redirect)** trafik HTTP ke HTTPS secara automatik selepas AutoSSL berjaya | ||
|
|
||
| ### ⚠️ Semakan Tambahan (Jika Redirect Tidak Automatik) | ||
|
|
||
| Jika laman masih boleh diakses via `http://` selepas SSL aktif, lakukan salah satu berikut: | ||
|
|
||
| - **Di cPanel:** Kembali ke "SSL/TLS Status", pastikan toggle **"Exclude from AutoSSL"** TIDAK diaktifkan, dan semak sama ada ada pilihan **"Force HTTPS Redirect"** yang perlu dihidupkan. | ||
| - **Melalui .htaccess:** Tambah kod ini di fail `.htaccess` dalam `public_html`: | ||
| ```apache | ||
| RewriteEngine On | ||
| RewriteCond %{HTTPS} off | ||
| RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | ||
| ``` | ||
| - **Jika guna WordPress:** Pasang plugin **Really Simple SSL** untuk mengurus redirect dan mixed content secara automatik. | ||
|
|
||
| ### Verifikasi Akhir | ||
| Selepas selesai, buka pelayar dan taip `http://www.sazwan.fairbase.com` — ia sepatutnya **terus bertukar** kepada `https://` dengan ikon 🔒. Anda juga boleh semak gred SSL di [ssllabs.com/ssltest](https://www.ssllabs.com/ssltest/) untuk memastikan konfigurasi adalah selamat. | ||
|
Sazwanismail marked this conversation as resolved.
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.