← Help  /  Install your certificate

How to install an SSL certificate on nginx

What you will have

  • Your certificate, which names your domain (a file such as example_com.crt).
  • The CA bundle, also called the chain or the intermediate certificates (a file such as example_com_CA.crt). It normally holds two certificates, one after the other.
  • Your private key, made when you created the CSR. It stays on your server.

The file names on your download may differ. Your certificate is the one that names your domain. The bundle holds the authority's certificates. Always put your certificate first, then the bundle. If you are not sure which file is which, paste them into our chain builder.

1. Join your certificate and the bundle

nginx wants everything in one file, your certificate first:

cat example_com.crt example_com_CA.crt > example.com-fullchain.crt

2. Point nginx at it

In the server block that listens on 443:

listen 443 ssl;
server_name example.com www.example.com;
ssl_certificate     /path/example.com-fullchain.crt;
ssl_certificate_key /path/example.com.key;

3. Test and reload

nginx -t
systemctl reload nginx

Check it worked

Use our free certificate checker on your website address. It shows the certificate, when it expires, whether the name matches and whether the whole chain is being sent. If it says the chain is incomplete, see how to fix an incomplete chain. If the old certificate is still showing, see why the old certificate still appears.

More in this section

Stuck? Call 03333 444 205 (Monday to Friday, 9am to 5pm, except public holidays) or use our contact form. We will help you get it working.

Browse certificates →   Free SSL tools →