SSL Certificate คืออะไร ทำไมต้องมี HTTPS
SSL certificate guide — what it is, how it works and why it matters
สารบัญ
SSL Certificate คืออะไร
SSL (Secure Sockets Layer) หรือ TLS (Transport Layer Security) คือโปรโตคอลเข้ารหัสที่ปกป้องข้อมูลระหว่างเบราว์เซอร์และเซิร์ฟเวอร์ เว็บที่มี SSL จะแสดง https:// และไอคอนแม่กุญแจ
SSL (Secure Sockets Layer) or TLS (Transport Layer Security) is an encryption protocol protecting data between browser and server. Sites with SSL show https:// and a padlock icon.
- เข้ารหัสข้อมูลระหว่าง browser และ server
- ป้องกัน man-in-the-middle attack
- แสดง https:// และ padlock
- Google ใช้ HTTPS เป็น ranking signal
SSL Certificate มีกี่ประเภท
SSL แบ่งเป็น DV (Domain Validated) OV (Organization Validated) และ EV (Extended Validation) แตกต่างกันที่ระดับการยืนยันตัวตน
SSL divides into DV (Domain Validated), OV (Organisation Validated) and EV (Extended Validation), differing in verification level.
- DV: ยืนยันเฉพาะโดเมน ออกภายในนาที ฟรีได้จาก Let's Encrypt
- OV: ยืนยันองค์กรด้วย ใช้เวลา 1-3 วัน
- EV: ยืนยันเข้มงวดที่สุด แสดงชื่อองค์กรใน browser
- Wildcard SSL: ครอบคลุมทุก subdomain
SSL ฟรีจาก Let's Encrypt คือคืออะไร
Let's Encrypt คือ Certificate Authority ที่ให้ DV SSL ฟรี ต่ออายุทุก 90 วันโดยอัตโนมัติ โฮสต์ส่วนใหญ่ integrate ให้แล้ว
Let's Encrypt is a Certificate Authority providing free DV SSL, auto-renewing every 90 days. Most hosts integrate it automatically.
- Let's Encrypt: DV SSL ฟรี 100%
- ต่ออายุอัตโนมัติด้วย certbot หรือ DirectAdmin
- โฮสต์ส่วนใหญ่ install ให้อัตโนมัติ
- เพียงพอสำหรับเว็บส่วนใหญ่
SSL Certificate ส่งผลต่อ SEO อย่างไร
Google ประกาศใช้ HTTPS เป็น ranking signal ตั้งแต่ปี 2014 เว็บที่ไม่มี SSL แสดงคำเตือน "Not Secure" ใน Chrome ทำให้ bounce rate สูงขึ้น
Google announced HTTPS as a ranking signal in 2014. Sites without SSL show a "Not Secure" warning in Chrome, increasing bounce rates.
- HTTPS เป็น ranking signal อย่างเป็นทางการ
- Chrome แสดง "Not Secure" บนเว็บ HTTP
- ผู้เข้าชมออกจากเว็บที่แสดง Not Secure
- Google ไม่ index เนื้อหาบน HTTP อย่างเต็มที่
วิธีติดตั้ง SSL Certificate บนเว็บ
ในโฮสต์ที่ใช้ DirectAdmin หรือ cPanel ติดตั้ง SSL ได้ใน 2-3 click หรือใช้ AutoSSL ที่ install อัตโนมัติ
On hosts using DirectAdmin or cPanel, install SSL in 2–3 clicks or use AutoSSL which installs automatically.
- DirectAdmin: SSL Certificates > Let's Encrypt
- cPanel: AutoSSL ทำงานอัตโนมัติ
- ตรวจสอบ https:// ใน browser หลัง install
- ตั้ง redirect HTTP → HTTPS ด้วย
SSL Certificate หมดอายุเกิดอะไรขึ้น
SSL หมดอายุแล้วเว็บจะแสดง warning ใหญ่ทำให้ผู้เข้าชมออก ควรตั้ง auto-renew หรือตรวจ expiry ทุก 60 วัน
When SSL expires the site shows a major browser warning causing visitors to leave. Set auto-renew or check expiry every 60 days.
- Let's Encrypt ต่ออายุอัตโนมัติทุก 90 วัน
- Paid SSL: ต่ออายุก่อนหมด 30 วัน
- ใช้ SSL Labs ssllabs.com ตรวจ status
- เซ็ต alert ใน monitoring tool
Mixed Content Warning คืออะไรและแก้ยังไง
Mixed content เกิดขึ้นเมื่อเว็บ HTTPS โหลด resource เช่น รูปภาพ ผ่าน HTTP ทำให้ browser แสดง warning และ block resource บางอย่าง
Mixed content occurs when an HTTPS page loads resources such as images over HTTP, causing browser warnings and blocking some resources.
- ใช้ plugin เช่น Better Search Replace แก้ URL ใน WordPress
- ตรวจด้วย Chrome DevTools > Console
- แก้ URL ในฐานข้อมูลให้เป็น https://
- ใช้ https:// เสมอเมื่อ link ภาพหรือไฟล์
Wildcard SSL Certificate คืออะไร
Wildcard SSL ครอบคลุมโดเมนหลักและทุก subdomain ในระดับเดียว เช่น *.yourdomain.com ประหยัดกว่าซื้อ SSL แยกสำหรับแต่ละ subdomain
Wildcard SSL covers the main domain and all subdomains at one level, such as *.yourdomain.com — cheaper than buying separate SSL for each subdomain.
- *.yourdomain.com ครอบ blog./ shop./ mail.
- ไม่ครอบ sub-subdomain เช่น a.blog.yourdomain.com
- ราคาสูงกว่า single DV แต่ถูกกว่าหลาย cert
- โฮสต์หลายเจ้ารวม wildcard Let's Encrypt ให้ฟรี