ssl-guides 2026-12-02 ⏱ 4 min read

How to Install a Free SSL Certificate

How to Install a Free SSL Certificate

To install a free SSL certificate, put the certificate, the intermediate chain and the private key on the server, point the web server at them, reload, then redirect HTTP and test.

Before you start

  • Your domain's DNS points at this server.
  • Ports 80 and 443 are open in the firewall.
  • You have the files: fullchain.pem (certificate plus intermediates) and privkey.pem.

Always use the full chain file for the certificate path. Using the leaf alone causes errors on some phones, as covered in SSL Works on Desktop, Fails on Android or iOS.

Install a free SSL certificate on Nginx

server {
    listen 443 ssl;
    server_name example.com www.example.com;

    ssl_certificate     /etc/ssl/example/fullchain.pem;
    ssl_certificate_key /etc/ssl/example/privkey.pem;
    ssl_protocols       TLSv1.2 TLSv1.3;
}

server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://$host$request_uri;
}

Test and reload:

sudo nginx -t && sudo systemctl reload nginx

Install a free SSL certificate on Apache

<VirtualHost *:443>
    ServerName example.com
    SSLEngine on
    SSLCertificateFile    /etc/ssl/example/cert.pem
    SSLCertificateKeyFile /etc/ssl/example/privkey.pem
    SSLCertificateChainFile /etc/ssl/example/chain.pem
</VirtualHost>

Newer Apache versions accept a full chain in SSLCertificateFile. Check the documentation for your version. Enable the module with a2enmod ssl, then run apachectl configtest and reload.

Hosting panels

In cPanel, DirectAdmin or Plesk, open the SSL section, paste the certificate, key and CA bundle in their fields and save. Or skip the paste and use the built-in free option: see the DirectAdmin guide or the aaPanel guide.

Redirect HTTP to HTTPS

The Nginx block above already does it. On WordPress with Apache, use the .htaccess redirect guide. Redirect loops behind a CDN are covered in the too many redirects fix.

Test the installation

  1. Open https://example.com and check the padlock.
  2. Click it and confirm the issuer and expiry date.
  3. Run a command-line check:
openssl s_client -connect example.com:443 \
  -servername example.com

Look for "Verify return code: 0 (ok)". Then use the certificate checker to confirm the chain from the outside.

Common errors

SymptomLikely cause
Certificate not trustedMissing intermediate certificates
Name mismatchHostname missing from the certificate
Server will not startKey does not match the certificate
Mixed content warningsPage loads http:// resources

For the last one, read the mixed content fix.

Do not forget renewal

Installation is half the job. A certificate that works today will expire. Set up automatic renewal and a reload hook so the server picks up new files, then monitor expiry. The automation guide covers it.

Where the files go

Pick a folder that only root can write to, for example /etc/ssl/example, and keep the key at mode 600. Certbot stores its files under /etc/letsencrypt/live/ and links to the newest version, so point the server at those links instead of copies. That way a renewal needs only a reload.

File names you will meet

FileContainsUsed for
cert.pemYour certificate onlyApache cert directive
chain.pemIntermediatesApache chain directive
fullchain.pemCertificate plus intermediatesNginx, most others
privkey.pemPrivate keyEvery server

Other servers

Node.js, Caddy, Traefik, HAProxy and Tomcat each have their own format. HAProxy wants the chain and key in one file. Java servers want a keystore, see Convert a PEM Certificate to a Java Keystore. For Node and Express, see HTTPS in Node.js, Express and Next.js.

After you reload

Check from a different network, because your own browser may cache a previous certificate or HSTS state. If the site works on desktop but not on a phone, suspect the chain. If it works for some hostnames only, suspect the SAN list.

Permissions and reloads

The web server reads certificates as root at startup, then drops privileges, so the key can stay root only. Reload with systemctl reload instead of restart, which keeps connections alive. If a reload fails, the old configuration keeps running, so read the error before you try again.

Staging first

If the site matters, test the new configuration on a staging host with the same server version. A typo in a server block can stop the whole server from reloading, and a dry run with the config test command catches that before visitors do.

Related reading: creating the certificate first, the Nginx walkthrough, generating the files with OpenSSL, the certificate path for an API and the SiteGround route.

Frequently Asked Questions

Which file goes in the certificate directive?

The leaf certificate first, then the intermediates, in one file. Serving the leaf alone gives a chain error on some clients and a working padlock on others, which is why the fault looks intermittent.

Why does the site still serve the old certificate after I reload?

Another server or process is answering: a second virtual host, a load balancer or a CDN. Check what each hop sends with openssl s_client -servername.

Do I have to restart or reload?

Reload is enough for Nginx and Apache and does not drop connections. A restart works too but drops live requests, so use reload in production.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ 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 www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant