SSL Certificate คืออะไร? วิธีติดตั้งบน Hosting ไทย 2026 What is SSL? How to Install SSL on Thai Hosting 2026
SSL (Secure Sockets Layer) หรือ TLS (Transport Layer Security) คือโปรโตคอลเข้ารหัสที่ทำให้การรับส่งข้อมูลระหว่างเว็บไซต์กับผู้ใช้ปลอดภัย เว็บที่มี SSL จะแสดงกุญแจเขียวและ "https://" ในแถบ URL ถ้าเว็บคุณยังไม่มี SSL วันนี้เป็นเวลาที่ต้องติดตั้งแล้ว
SSL (Secure Sockets Layer) / TLS (Transport Layer Security) is an encryption protocol securing data transfer between websites and users. Sites with SSL show a padlock icon and "https://" in the address bar. If your site lacks SSL, it's time to install one today.
สารบัญ / Table of Contents
SSL คืออะไร และทำงานยังไง?
SSL/TLS ทำงานโดยการสร้าง "อุโมงค์" เข้ารหัสระหว่าง browser ของผู้ใช้กับ server ของเว็บไซต์ ข้อมูลทุกอย่างที่ส่งผ่านอุโมงค์นี้ — ไม่ว่าจะเป็นรหัสผ่าน, ข้อมูลบัตรเครดิต, หรือข้อมูลส่วนตัว — จะถูกเข้ารหัสจนไม่สามารถดักอ่านได้ระหว่างทาง
SSL/TLS creates an encrypted "tunnel" between the user's browser and the web server. All data passing through this tunnel — passwords, credit card numbers, personal information — is encrypted and cannot be intercepted in transit.
กระบวนการ SSL Handshake ทำงานแบบนี้:
- Step 1 — Hello: Browser ส่งข้อความบอก Server ว่าต้องการเชื่อมต่อแบบ HTTPS
- Step 2 — Certificate: Server ส่ง SSL Certificate มาให้ Browser ตรวจสอบ
- Step 3 — Key Exchange: ทั้งสองฝั่งแลก Key เพื่อสร้างการเข้ารหัสร่วมกัน
- Step 4 — Encrypted Session: การสื่อสารทุกอย่างหลังจากนี้ถูกเข้ารหัสด้วย Symmetric Key
The SSL Handshake process: 1) Browser sends Hello to Server requesting HTTPS. 2) Server sends SSL Certificate for verification. 3) Both sides exchange keys to establish shared encryption. 4) All subsequent communication is encrypted with a Symmetric Key.
ทำไมทุกเว็บต้องมี SSL?
เหตุผลหลักที่เว็บทุกเว็บควรมี SSL ในปี 2026 มีหลายมิติทั้งด้านความปลอดภัย SEO และ UX:
1. ความปลอดภัยของผู้ใช้
หากไม่มี SSL ข้อมูลที่ผู้ใช้ส่งผ่านฟอร์ม เช่น ชื่อ-นามสกุล อีเมล รหัสผ่าน หรือเลขบัตรเครดิต จะถูกส่งในรูปแบบ plain text ที่ใครก็อ่านได้ระหว่างทาง (Man-in-the-Middle Attack)
Without SSL, data submitted through forms — names, emails, passwords, credit card numbers — travels as plain text that anyone can intercept (Man-in-the-Middle Attack).
2. Google Rankings
Google ประกาศตั้งแต่ปี 2014 ว่า HTTPS เป็น Ranking Signal เว็บที่มี SSL จะได้รับความสำคัญในผลการค้นหามากกว่าเว็บที่ไม่มี โดยเฉพาะเมื่อเนื้อหาและ SEO อื่นๆ เท่ากัน
Google announced in 2014 that HTTPS is a ranking signal. Sites with SSL rank better in search results, especially when other SEO factors are equal.
3. Browser Warning
Chrome, Firefox, Safari จะแสดงข้อความ "ไม่ปลอดภัย" (Not Secure) ที่แถบ URL สำหรับเว็บ HTTP ทำให้ผู้ใช้ไม่กล้าใช้งาน อัตรา Bounce Rate สูงขึ้น และ Conversion Rate ลดลงอย่างมีนัยสำคัญ
Chrome, Firefox, and Safari display "Not Secure" warnings in the URL bar for HTTP sites, causing users to distrust the site, increasing bounce rates and reducing conversion rates significantly.
4. PDPA Compliance
พระราชบัญญัติคุ้มครองข้อมูลส่วนบุคคล (PDPA) ของไทยกำหนดให้องค์กรต้องมีมาตรการรักษาความปลอดภัยของข้อมูล การใช้ SSL เป็นส่วนหนึ่งของการปฏิบัติตามกฎหมายนี้
Thailand's Personal Data Protection Act (PDPA) requires organizations to implement data security measures. Using SSL is part of PDPA compliance requirements.
ประเภท SSL Certificate
SSL Certificate แบ่งตามระดับการตรวจสอบตัวตน (Validation Level) ได้ 3 ประเภทหลัก:
Domain Validation (DV) SSL
ตรวจสอบเฉพาะว่าคุณเป็นเจ้าของโดเมนนั้นจริง ออก Certificate ได้เร็ว (ไม่กี่นาที) ราคาถูกหรือฟรี เหมาะกับบล็อก เว็บทั่วไป หรือ landing page
Verifies only that you own the domain. Issues quickly (minutes), cheap or free. Suitable for blogs, general websites, and landing pages.
Organization Validation (OV) SSL
ตรวจสอบตัวตนขององค์กรด้วย ใช้เวลาออก 1-3 วัน ราคาสูงกว่า DV เหมาะกับเว็บธุรกิจที่ต้องการแสดงความน่าเชื่อถือ
Verifies organizational identity as well. Takes 1-3 days to issue, costs more than DV. Suitable for business websites requiring credibility.
Extended Validation (EV) SSL
ระดับสูงสุด ตรวจสอบตัวตนองค์กรอย่างละเอียด เดิมจะแสดงชื่อบริษัทสีเขียวใน address bar แต่ browser สมัยใหม่เลิกแสดงแล้ว ปัจจุบันเหมาะกับ fintech หรือองค์กรขนาดใหญ่เท่านั้น
Highest level, thorough organizational verification. Previously showed company name in green address bar but modern browsers no longer display this. Now suitable only for fintech or large organizations.
Wildcard SSL
ครอบคลุมโดเมนหลักและ subdomain ทุกตัว เช่น *.example.com ครอบ blog.example.com, shop.example.com, mail.example.com — คุ้มค่าถ้ามี subdomain หลายตัว
Covers the main domain and all subdomains, e.g., *.example.com covers blog.example.com, shop.example.com, mail.example.com — cost-effective when you have multiple subdomains.
Multi-Domain (SAN) SSL
ครอบคลุมหลายโดเมนต่างกันในใบเดียว เช่น example.com, example.net, example.co.th — ลดต้นทุนสำหรับองค์กรที่มีหลายโดเมน
Covers multiple different domains in one certificate, e.g., example.com, example.net, example.co.th — reduces costs for organizations with multiple domains.
SSL ฟรี vs SSL แบบซื้อ
คำถามยอดนิยมสำหรับผู้ใช้ hosting ไทยคือ "ต้องซื้อ SSL ไหม หรือใช้ฟรีก็พอ?"
SSL ฟรี (Let's Encrypt)
- ฟรี 100% ไม่มีค่าใช้จ่าย
- ต่ออายุอัตโนมัติทุก 90 วัน (hosting ส่วนใหญ่ทำให้อัตโนมัติ)
- ระดับ DV (Domain Validation)
- รองรับโดย browser ทุกตัว
- เหมาะกับเว็บทั่วไป บล็อก พอร์ตโฟลิโอ
SSL แบบซื้อ (Comodo, DigiCert, Sectigo ฯลฯ)
- มี Warranty (ประกันชดเชยหากมีปัญหาจากการเข้ารหัส)
- ระดับ OV หรือ EV ให้ความน่าเชื่อถือมากกว่า
- มี Technical Support จากบริษัท CA
- บางตัวครอบ Wildcard หรือ Multi-Domain
- ราคาตั้งแต่ไม่กี่ร้อยบาท ถึงหลายพันบาทต่อปี
สรุป: สำหรับเว็บทั่วไปและ SME ไทยส่วนใหญ่ SSL ฟรีจาก Let's Encrypt เพียงพอแล้ว ไม่จำเป็นต้องซื้อ SSL แยก เว้นแต่ต้องการ Warranty, OV/EV, หรือ Wildcard ราคาถูก
Summary: For most general websites and Thai SMEs, free Let's Encrypt SSL is sufficient. No need to purchase SSL separately unless you need Warranty, OV/EV validation, or cost-effective Wildcard coverage.
ติดตั้ง SSL บน DirectAdmin
DirectAdmin เป็น control panel ที่ hosting หลายเจ้าในไทย รวมถึง AsiaGB ใช้ การติดตั้ง SSL ทำได้ง่ายมากผ่านหน้า Web ไม่ต้องพิมพ์ command เลย
DirectAdmin is the control panel used by many Thai hosting providers including AsiaGB. SSL installation is straightforward through the web interface — no command line needed.
วิธีติดตั้ง Let's Encrypt บน DirectAdmin
- Login เข้า DirectAdmin ด้วย username และ password ของคุณ
- ไปที่ Advanced Features → SSL Certificates
- เลือก tab "Free & automatic certificate from Let's Encrypt"
- ติ๊กถูก domain และ subdomain ที่ต้องการออก SSL (ปกติคือ example.com และ www.example.com)
- คลิก Save
- รอ 1-2 นาที ระบบจะออก SSL ให้อัตโนมัติ
- ตรวจสอบโดยเปิด https://yourdomain.com — ควรเห็นกุญแจเขียวแล้ว
Steps to install Let's Encrypt on DirectAdmin: 1) Log in to DirectAdmin. 2) Go to Advanced Features → SSL Certificates. 3) Select "Free & automatic certificate from Let's Encrypt" tab. 4) Check your domain and www subdomain. 5) Click Save. 6) Wait 1-2 minutes for automatic issuance. 7) Verify by visiting https://yourdomain.com — you should see a padlock icon.
วิธีติดตั้ง SSL แบบซื้อบน DirectAdmin
- ซื้อ SSL Certificate จาก provider (จะได้ .crt และ .key ไฟล์)
- ใน DirectAdmin → SSL Certificates → เลือก "Paste a pre-generated certificate and key"
- Paste Certificate (.crt) ใน Certificate box
- Paste Private Key (.key) ใน Key box
- ถ้ามี CA Bundle ให้ paste ใน CA Certificate box ด้วย
- คลิก Save และรอไม่กี่วินาที
Let's Encrypt คืออะไร?
Let's Encrypt คือ Certificate Authority (CA) ที่ไม่แสวงหากำไร ออก SSL Certificate ฟรีให้กับทุกคน ก่อตั้งโดยกลุ่ม Internet Security Research Group (ISRG) และได้รับการสนับสนุนจาก Mozilla, Google, EFF และบริษัทเทคโนโลยีชั้นนำ
Let's Encrypt is a non-profit Certificate Authority (CA) that issues free SSL certificates to everyone. Founded by the Internet Security Research Group (ISRG) and supported by Mozilla, Google, EFF, and leading technology companies.
จุดเด่นของ Let's Encrypt:
- ฟรี 100%: ไม่มีค่าใช้จ่ายตลอดกาล
- อัตโนมัติ: ต่ออายุอัตโนมัติทุก 90 วัน (hosting ที่รองรับจัดการให้)
- รับรองโดยทุก browser: Chrome, Firefox, Safari, Edge รองรับทั้งหมด
- ง่าย: ติดตั้งผ่าน control panel ได้เลย ไม่ต้องยุ่งกับ command line
- ปลอดภัย: มาตรฐาน TLS 1.2/1.3 เต็มรูปแบบ
ตั้งค่า Redirect HTTP → HTTPS
หลังติดตั้ง SSL แล้ว ต้องตั้งค่าให้เว็บ redirect จาก HTTP ไป HTTPS อัตโนมัติ ไม่งั้นผู้ใช้ที่พิมพ์ http:// จะยังเห็นเว็บ HTTP ที่ไม่ปลอดภัยอยู่
After installing SSL, configure automatic redirect from HTTP to HTTPS. Otherwise, users typing http:// will still land on the insecure HTTP version.
วิธีที่ 1: ตั้งผ่าน DirectAdmin
DirectAdmin มีตัวเลือก "Force SSL with https redirect" ในหน้า SSL Certificates ติ๊กถูกแล้ว Save — ระบบจะสร้าง redirect ให้อัตโนมัติ
วิธีที่ 2: ตั้งผ่าน .htaccess (Apache)
เพิ่มบรรทัดนี้ที่ต้นไฟล์ .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
วิธีที่ 3: ตั้งผ่าน WordPress
ติดตั้ง plugin Really Simple SSL แล้วกด Activate — plugin จะจัดการ redirect และแก้ mixed content ให้อัตโนมัติ
แก้ปัญหา Mixed Content
Mixed Content คือปัญหาที่เว็บโหลดผ่าน HTTPS แต่มีทรัพยากรบางอย่าง (รูปภาพ, CSS, JavaScript) ที่ยังโหลดผ่าน HTTP ทำให้ browser แสดงคำเตือนและบล็อกเนื้อหาบางส่วน
Mixed Content occurs when a page loads via HTTPS but some resources (images, CSS, JavaScript) still load via HTTP, causing browser warnings and blocking some content.
วิธีตรวจสอบ Mixed Content
- เปิด Chrome DevTools (F12) → Console — จะเห็น warning แดงสำหรับทรัพยากร HTTP
- ใช้เครื่องมือออนไลน์เช่น whynopadlock.com หรือ dnsxray.com ตรวจสอบ
วิธีแก้ Mixed Content
- WordPress: ติดตั้ง Really Simple SSL หรือ Better Search Replace เปลี่ยน http:// เป็น https:// ใน database
- HTML ทั่วไป: Search and replace ลิงก์ http:// เป็น https:// ในไฟล์ source
- External Resources: ถ้า resource นั้นไม่รองรับ HTTPS ให้ host ไว้บน server ของตัวเอง
วิธีตรวจสอบ SSL ของเว็บ
หลังติดตั้ง SSL แล้วควรตรวจสอบว่าทำงานถูกต้องก่อนประกาศว่าเสร็จแล้ว เครื่องมือที่ใช้ได้:
After installing SSL, verify it's working correctly before declaring done. Useful tools:
- SSL Labs (ssllabs.com/ssltest): ตรวจสอบคะแนน SSL A/B/F และช่องโหว่
- Why No Padlock (whynopadlock.com): ตรวจ mixed content โดยเฉพาะ
- dnsxray.com: เครื่องมือไทย ตรวจ SSL และ security headers รวมกัน
- Chrome DevTools: เปิด Security tab ดู certificate details และ mixed content
สิ่งที่ต้องตรวจสอบ:
- ใบ SSL ออกให้ domain ถูกต้อง
- วันหมดอายุ (ถ้าใช้ Let's Encrypt ควรต่ออายุอัตโนมัติ)
- Chain of Trust สมบูรณ์ (ไม่ขึ้น "Untrusted")
- ไม่มี Mixed Content
- Redirect จาก HTTP ไป HTTPS ทำงาน
คำถามที่พบบ่อย (FAQ)
SSL ฟรี Let's Encrypt กับ SSL แบบซื้อต่างกันยังไง?
Let's Encrypt ฟรี ต่ออายุทุก 90 วัน เหมาะบล็อก/เว็บทั่วไป SSL แบบซื้อมีการรับประกัน warranty มากกว่า มีระดับ OV/EV ที่ตรวจสอบตัวตนองค์กรด้วย เหมาะ e-commerce หรือเว็บที่ต้องการความน่าเชื่อถือระดับสูง
ถ้าไม่มี SSL เว็บจะเป็นอย่างไร?
บราวเซอร์จะแสดง "ไม่ปลอดภัย" ที่แถบ URL, Google จะให้อันดับต่ำกว่า, ผู้ใช้ไม่กล้ากรอกข้อมูลส่วนตัว และอาจสูญเสีย Conversion Rate อย่างมีนัยสำคัญ
ติดตั้ง SSL ใน DirectAdmin ทำได้เองไหม?
ทำได้เลย ผ่านเมนู SSL Certificates ใน DirectAdmin เลือก Let's Encrypt แล้วคลิก Save — ระบบจะออก SSL ให้อัตโนมัติภายใน 1-2 นาที ไม่ต้องใช้ command line เลย
SSL หมดอายุแล้วเว็บจะเป็นยังไง?
บราวเซอร์จะแสดงหน้า warning สีแดงใหญ่บอกว่า certificate หมดอายุ ผู้ใช้ส่วนใหญ่จะไม่กล้าเข้าเว็บต่อ ควรตรวจสอบวันหมดอายุและตั้ง auto-renew ไว้เสมอ
SSL มีผลต่อ SEO จริงไหม?
ใช่ Google ยืนยันว่า HTTPS เป็น ranking factor ตั้งแต่ปี 2014 และมีน้ำหนักในการจัดอันดับ เว็บ HTTPS มีโอกาสได้อันดับดีกว่า HTTP ในคะแนนที่เท่ากัน