How to Use ZeroSSL Free Certificates for Secure HTTPS

Author: JJustis | Published: 2025-10-17 18:19:03
Article Image 1
How to Use ZeroSSL Free Certificates for Secure HTTPS

ZeroSSL offers free SSL/TLS certificates compatible with most web servers, including Apache, Nginx, and Lighttpd. It provides an excellent alternative to paid certificates and integrates easily with automation tools like acme.sh or Certbot. Below is a full walkthrough for setting up and renewing ZeroSSL certificates efficiently.

1. What is ZeroSSL?
  • ZeroSSL is a certificate authority that issues 90-day free SSL certificates using the ACME protocol.
  • It’s fully trusted by all major browsers and devices.
  • Certificates can be renewed automatically, similar to Let’s Encrypt.
  • ZeroSSL provides both web-based and command-line enrollment methods.

  • 2. Signing Up for a Free Account
  • Visit ZeroSSL Official Site
  • Click on Get Free SSL and sign up for an account.
  • After logging in, go to the Certificates dashboard.
  • Click New Certificate and enter your domain (e.g., example.com).
  • Choose 90-day Free Certificate to continue.

  • 3. Domain Validation Methods
  • ZeroSSL supports three validation types:
  • HTTP File Upload: You upload a small validation file to your website root.
  • DNS CNAME Record: You add a validation record to your DNS manager.
  • Email Validation: A confirmation email is sent to admin@yourdomain.com.
  • Once validation completes, your certificate will be ready for download.

  • 4. Downloading and Installing Certificates
  • After validation, download the certificate bundle from your ZeroSSL dashboard.
  • Extract the files — typically you’ll receive:
  • File NamePurpose
    certificate.crtThe main public certificate
    ca_bundle.crtIntermediate certificate chain
    private.keyYour private server key (keep secure)

  • Move these to your server’s SSL directory, such as /etc/ssl/zerossl/
  • Set strict permissions: chmod 600 /etc/ssl/zerossl/private.key

  • 5. Configuring Apache or Nginx
  • For Apache:

  • SSLEngine on
    SSLCertificateFile /etc/ssl/zerossl/certificate.crt
    SSLCertificateKeyFile /etc/ssl/zerossl/private.key
    SSLCertificateChainFile /etc/ssl/zerossl/ca_bundle.crt

  • For Nginx:

  • ssl_certificate /etc/ssl/zerossl/certificate.crt;
    ssl_certificate_key /etc/ssl/zerossl/private.key;
    ssl_trusted_certificate /etc/ssl/zerossl/ca_bundle.crt;

  • Restart your web server: systemctl restart apache2 or systemctl restart nginx

  • 6. Automating Renewals with acme.sh
  • Install acme.sh: curl https://get.acme.sh | sh
  • Register your ZeroSSL account key: acme.sh --register-account -m your@email.com --server zerossl
  • Issue a certificate: acme.sh --issue -d example.com --nginx --server zerossl
  • Install the issued certificate automatically:

  • acme.sh --install-cert -d example.com \
    --key-file /etc/ssl/zerossl/private.key \
    --fullchain-file /etc/ssl/zerossl/certificate.crt \
    --reloadcmd "systemctl reload nginx"

  • Set a cron job to renew automatically every 60 days.

  • 7. Verifying SSL Installation
  • Check syntax: nginx -t or apachectl configtest
  • Restart the server after applying SSL changes.
  • Verify certificate using: openssl s_client -connect example.com:443 -servername example.com
  • Look for “Verify return code: 0 (ok)” in the output.
  • You can also test via SSL Labs Server Test

  • 8. Tips for Best Practice
  • Always keep HTTP to HTTPS redirects enabled.
  • Renew early — don’t wait for expiration dates.
  • Use HSTS headers to enforce HTTPS: Strict-Transport-Security
  • Secure private keys with strict permissions and backups.
  • Monitor SSL expiration via cron or external uptime tools.

  • 9. Troubleshooting Common Errors
    IssuePossible Fix
    Validation failedCheck DNS or ensure HTTP challenge file is accessible publicly
    Chain incompleteInclude ca_bundle.crt in the configuration
    Server mismatchEnsure certificate CN matches the domain exactly
    Browser warningClear cache and recheck using https://

    10. Useful Links
  • ZeroSSL Official Page
  • acme.sh Automation Script
  • SSL Labs Analyzer
  • Nginx HTTPS Guide
  • Apache SSL How-To

  • Conclusion:
    ZeroSSL provides a simple, free, and highly trusted method to encrypt your website traffic with HTTPS. Whether you manage a personal blog or an enterprise API, automating with ACME and monitoring renewals ensures a secure, reliable online presence. When combined with strong server hardening and SELinux, it creates a professional-grade secure environment with zero cost.