ssl
2026-11-28
How to Enable HTTPS SSL on Localhost (XAMPP, WAMP & Laragon)
Quick Answer: Public CAs like Let's Encrypt cannot issue certificates for
localhost. To get a green padlock on XAMPP, WAMP, or Laragon without browser warnings, install mkcert (`mkcert -install` then `mkcert localhost 127.0.0.1`) and point Apache's httpd-ssl.conf to the generated files.Localhost SSL Methods Compared
| Method | Chrome Warning? | Best For |
|---|---|---|
| mkcert (Local Root CA) | No (Green Padlock) | XAMPP, WAMP, Node.js, Vite |
| Laragon Auto-SSL | No (1-Click Enable) | Laragon Windows users |
| Self-Signed OpenSSL | Yes (Requires click-through) | Quick temporary testing |
3-Step XAMPP mkcert Setup
- Run
mkcert -installonce to trust the local CA in Windows/macOS. - Run
mkcert localhost 127.0.0.1to generatelocalhost.pemandlocalhost-key.pem. - Update
SSLCertificateFileandSSLCertificateKeyFileinapache/conf/extra/httpd-ssl.confand restart Apache.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.