How to build a certificate chain
Drop the server certificate and the CA bundle your certificate authority sent, in any order. They are put in order, server certificate first, each link’s signature is checked, and you download fullchain.pem or the CA bundle on its own.
Add the certificates
The .crt your CA issued and its intermediate or bundle files: PEM, DER, CRT, CER or P7B, several files or one PEM with them all. Pasted PEM text works too.
Check the chain
Each certificate is listed in order with its expiry. A missing intermediate is named, with the address where your CA publishes it when the certificate says so.
Download
fullchain.pem for nginx and most servers, or the CA bundle on its own for Apache’s SSLCertificateChainFile and IIS.
Which file for which server
| Server | File |
|---|---|
| nginx | fullchain.pem as ssl_certificate |
| Apache 2.4.8 and later | fullchain.pem as SSLCertificateFile |
| Older Apache | The certificate as SSLCertificateFile, the CA bundle as SSLCertificateChainFile |
| HAProxy | fullchain.pem with the private key added at the end |
| IIS and Windows | A PFX: make one with the certificate, its key and this bundle |
Specs
| Reads | PEM, DER, CRT, CER and P7B; several files or one combined PEM |
|---|---|
| Order | Server certificate first, then each issuer; the root left out unless asked for |
| Checks | Each certificate is signed by the next; expiry of each; what is missing above the last |
| Saves | fullchain.pem, ca-bundle.crt, or the chain copied as text |
| Price | Free, no account |
Questions
What is fullchain.pem?
The server certificate followed by the intermediate certificates that link it to a root, in one file. Servers send it so browsers can check the certificate without fetching anything.
Why does the order matter?
Each certificate must be followed by the one that issued it. A chain in the wrong order or with an intermediate missing works in some browsers and fails in others, apps and older phones.
Should the root certificate be included?
No. Browsers and systems already have the roots they trust, so sending it only adds bytes. Switch on Include the root if a system asks for it.
An intermediate is missing. Where do I get it?
From your certificate authority: it is in the bundle they sent with the certificate, and most certificates name the address where it can be downloaded, which is shown here.
Are my files uploaded?
No. The certificates are read and put in order by your browser. Nothing is sent anywhere.