What Is an SSL Certificate Chain
Quick answer
An SSL/TLS certificate chain connects a website certificate to a root trusted by the client, usually through one or more intermediates. The server sends its leaf certificate and required intermediates. To diagnose a problem, inspect that list, then verify the trust path and hostname; displaying certificates alone does not prove they are valid.
On this page
What you'll learn
- Understand the hierarchical structure of root, intermediate, and leaf certificates in the chain of trust
- Diagnose common certificate chain errors including missing intermediates and wrong certificate order
- Use OpenSSL and dig to verify certificate chains and DANE/TLSA records
- Configure DNS records like CAA and TLSA to strengthen your certificate security posture
An SSL certificate chain (also called a certificate chain of trust) is the ordered list of certificates that connects your server's SSL/TLS certificate back to a trusted root Certificate Authority (CA). Browsers and operating systems use this chain to verify that your website's certificate is legitimate.
How the Certificate Chain Works
Every HTTPS connection relies on a chain of trust with three layers:
Root CA Certificate (self-signed, trusted by browsers/OS)
└── Intermediate CA Certificate (signed by Root CA)
└── Leaf Certificate (your server's certificate, signed by Intermediate CA)When a browser connects to your site:
- Your server presents the leaf certificate (your domain's cert) and any intermediate certificates
- The browser walks up the chain, verifying each certificate's signature against its issuer
- Once it reaches a root certificate that's already in the browser's trust store, the chain is verified
- The connection is established as secure
This certificate-chain validation happens during the TLS handshake, after the server presents its certificate and before encrypted application data is accepted.
Each certificate in the chain contains the issuer's distinguished name and the subject's public key. The browser verifies each signature using the issuer's public key, creating a cryptographic chain from your leaf certificate all the way to a trusted root.
Why Intermediate Certificates Exist
Root CA certificates are extremely valuable — if a root key is compromised, every certificate it issued becomes untrusted. To minimize risk:
- Root CAs are kept offline in air-gapped, high-security environments
- Root CAs sign a small number of intermediate CA certificates
- Intermediate CAs handle the day-to-day work of issuing certificates to websites
- If an intermediate is compromised, only that intermediate is revoked — the root remains trusted
This layered approach is why most certificate chains have 3 levels, though some chains are longer. Some CAs use two levels of intermediates, resulting in a 4-certificate chain. The key principle is that the root must never be exposed to online operations.
Root Trust Stores
Every browser and operating system maintains its own root trust store — a curated list of root CA certificates that it trusts. These stores are carefully managed:
- Mozilla NSS — used by Firefox, contains around 150 root CAs
- Apple Trust Store — used by Safari and macOS/iOS applications
- Microsoft Root Certificate Program — used by Windows and Edge
- Chrome Root Store — Chrome uses its own root program on supported platforms; platform and enterprise trust behavior also matters
When your certificate chain terminates at a root that's not in the client's trust store, the connection fails. This is why self-signed certificates and certificates from unknown CAs produce browser warnings.
Root trust stores are updated regularly. If a CA is found to have issued certificates improperly, its root can be removed from trust stores, effectively revoking all certificates in its chain. This has happened to several major CAs over the years.
Certificate Chain Example
Here is a simplified illustrative chain; the actual issuer depends on the certificate and CA:
[Root] Trusted Root CA
↓ signs
[Intermediate] Issuing CA
↓ signs
[Leaf] www.example.comYou can inspect any site's chain using OpenSSL:
openssl s_client -connect www.example.com:443 -servername www.example.com -showcerts </dev/nullOr using curl with verbose output:
curl -vI https://www.example.com 2>&1 | grep -A6 "Server certificate"Chain Validation in Detail
When a browser validates a certificate chain, it performs several checks on each certificate:
- Signature verification — the certificate's signature is valid using the issuer's public key
- Validity period — the certificate's notBefore and notAfter dates are within range
- Revocation status — checked via CRL (Certificate Revocation List) or OCSP (Online Certificate Status Protocol)
- Hostname verification — the requested hostname matches a subjectAltName entry; CA name constraints are a separate path-validation restriction
- Key usage — the certificate is authorized for TLS server authentication
- Path length — intermediate CA certificates respect
pathLenConstraintif set
# Verify a full chain locally with OpenSSL
openssl verify -CAfile root.pem -untrusted intermediate.pem leaf.pem
# Check certificate details including validity dates and extensions
openssl x509 -in leaf.pem -noout -text
# Check OCSP revocation status
openssl ocsp -issuer intermediate.pem -cert leaf.pem \
-url http://ocsp.example.com -resp_textCommon Certificate Chain Errors
Incomplete Chain (Missing Intermediate)
The most common SSL error. Your server sends the leaf certificate but not the intermediate:
Browser error: "Unable to verify the first certificate"
"ERR_CERT_AUTHORITY_INVALID"Fix: Configure your web server to send the full chain. Most CAs provide a "full chain" or "CA bundle" file:
# Nginx — use the full chain file
ssl_certificate /etc/ssl/certs/fullchain.pem;
ssl_certificate_key /etc/ssl/private/privkey.pem;# Apache 2.4.8+ — leaf followed by intermediates in one file
SSLCertificateFile /etc/ssl/certs/fullchain.pem
SSLCertificateKeyFile /etc/ssl/private/server.keySSLCertificateChainFile is deprecated; use SSLCertificateFile with the full chain on Apache 2.4.8 and later.Wrong Order
Certificates in the chain file must be ordered from leaf to root:
-----BEGIN CERTIFICATE-----
(Your server/leaf certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Intermediate certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Normally omit the root: clients must already trust it independently)
-----END CERTIFICATE-----Expired Intermediate Certificate
Even if your leaf certificate is valid, an expired intermediate breaks the chain. Check expiration dates:
openssl x509 -in intermediate.pem -noout -datesAn expired root is a different failure from an expired intermediate. Historical root transitions, including DST Root CA X3 in 2021, show why the correct path depends on the client's trust store and alternate-chain support.
Cross-Signed Certificates
Some CAs use cross-signing to maintain compatibility with older trust stores. Cross-signing creates distinct certificates for the same subject and public key, issued by different CAs. These can provide alternative trust paths. This provides broader device compatibility but can complicate chain configuration.
Self-Signed Certificate
A self-signed certificate has no chain — the leaf signs itself. Browsers don't trust these by default because there's no third-party verification.
How to Verify Your Certificate Chain
Using OpenSSL
# Inspect the certificates sent by the server (not a verification result)
openssl s_client -connect yourdomain.com:443 -servername yourdomain.com \
-showcerts </dev/null
# Validate the trust path AND requested hostname with your local trust store
openssl s_client -connect yourdomain.com:443 -servername yourdomain.com \
-verify_hostname yourdomain.com -verify_return_error </dev/null
# Validate a saved leaf, supplying intermediates separately
openssl verify -purpose sslserver -verify_hostname yourdomain.com \
-CAfile trusted-roots.pem -untrusted intermediates.pem leaf.pemReplace yourdomain.com with the actual hostname. A successful validation reports Verify return code: 0 (ok); a saved-file check reports leaf.pem: OK. OpenSSL must have a usable CA trust store (or an explicit trusted CA file). -servername sets SNI; it does not by itself enable hostname verification. -showcerts displays the sent certificate list, not a verified chain.
Interpret the Verification Result
| Result | What to check next |
|---|---|
Verify return code: 0 (ok) | This client accepted the trust path and requested hostname. Other clients may use different trust stores. |
unable to get local issuer certificate | Check the server's intermediate chain and the client's trusted roots; either can be missing. |
certificate has expired | Identify the expired leaf or intermediate, renew or replace it, and reload the serving configuration. |
hostname mismatch | Check the requested hostname against the leaf certificate's subject alternative names and the virtual-host configuration. |
| Connection timeout or refused | Check DNS, routing, firewall, and the TLS listener before investigating the certificate chain. |
-showcerts output or a test with verification disabled as a successful validation.Using Online Tools
Most SSL testing tools will show you the complete chain and flag any issues, including missing intermediates or expiring certificates.
Using dig for DNS-Based Certificate Verification
DANE (DNS-Based Authentication of Named Entities) uses TLSA records to publish certificate information in DNS:
dig TLSA _443._tcp.yourdomain.comThis allows domain owners to specify exactly which certificates are valid for their domain, adding a DNS layer of verification on top of the traditional CA chain. You can manage TLSA records in DNScale to enable DANE for your domains.
DANE requires authenticated TLSA data using DNSSEC, which ensures that the TLSA records themselves haven't been tampered with. Without DNSSEC, an attacker could spoof TLSA records to redirect trust.
Certificate Chain and DNS
DNS plays an important role in certificate issuance and verification:
- Domain Validation (DV): CAs verify domain ownership via DNS records (TXT or CNAME)
- CAA Records: Specify which CAs are allowed to issue certificates for your domain
- DANE/TLSA: Publish certificate fingerprints directly in DNS for additional validation
- ACME DNS-01 Challenge: Let's Encrypt and other ACME CAs can validate domain ownership by creating a TXT record under
_acme-challenge.yourdomain.com
With DNScale, you can manage CAA records and TLSA records to control and secure your certificate infrastructure. You can also automate ACME DNS-01 challenges via the DNScale API for fully automated certificate issuance.
Certificate Transparency
Certificate Transparency (CT) is a public logging system that records all issued certificates. Browser root programs impose Certificate Transparency requirements on publicly trusted TLS certificates. Logging and signed certificate timestamps provide evidence of inclusion; this is separate from ordinary chain validation. You can monitor CT logs to:
- Detect unauthorized certificates issued for your domain
- Verify that your CA is properly logging certificates
- Audit certificate issuance across your organization
CAA records work alongside CT by restricting which CAs can issue in the first place, while CT provides after-the-fact visibility into what was actually issued.
Best Practices
- Always include intermediate certificates — never send just the leaf certificate from your server
- Use CAA records to restrict which CAs can issue certificates for your domains
- Automate certificate renewal — expired certificates (or intermediates) break the chain
- Monitor certificate expiration across your entire chain, not just the leaf
- Test after every change — verify the full chain works after renewing or replacing certificates
- Consider DANE — publish TLSA records with DNSSEC for an additional layer of trust
- Use Certificate Transparency monitoring — detect unauthorized issuance early
- Test on multiple platforms — verify your chain works on mobile, desktop, and API clients
Conclusion
The SSL certificate chain is the backbone of trust on the web. Understanding how root, intermediate, and leaf certificates connect helps you properly configure HTTPS on your servers and quickly diagnose certificate errors. Each link in the chain must be valid, properly ordered, and verifiable back to a trusted root. Combined with DNS records like CAA and TLSA managed through DNScale, you can build a stronger certificate security strategy that reduces mis-issuance risk and adds DNS-based verification on top of the traditional CA model.
References
Frequently asked questions
- Why do I need to install intermediate certificates on my server?
- Browsers and OS trust stores ship with root CA certificates only — typically a few hundred root CAs are pre-trusted. Public CAs don't issue end-entity certificates directly from their roots (those are kept offline for security); they issue from intermediate CAs. Your server must serve the chain — leaf + intermediate(s) — so clients can connect the leaf back to a known root.
- How do I know if my chain is broken?
openssl s_client -connect example.com:443 -servername example.com -showcertsprints the chain. If the server omits required intermediates, some clients cannot build the trust path. This command only displays what the server sends; use hostname and trust verification as well. Browsers will show 'unable to verify the first certificate' or similar. Online tools like SSL Labs, ssl-checker.com, and sectigo.com/ssl-tools/ssl-checker also surface chain issues.- What's the order of certificates in a chain bundle?
- Server certificate (leaf) first, then intermediates from closest-to-leaf working up to closest-to-root. With Certbot,
fullchain.pemcontains the leaf and intermediates;chain.pemcontains intermediates only. Check your CA/client's file definitions and deploy the complete server bundle. If you build the bundle manually, get the order wrong and clients will refuse to validate. - Can I use multiple chains for the same certificate?
- Yes — some CAs issue cross-signed intermediates that can chain to multiple roots, useful during root rotations or for compatibility with older trust stores. Let's Encrypt did this for years to support older Android devices via the IdenTrust DST X3 root. Your CA tells you whether a cross-signed chain is needed; for most modern deployments, the default chain is fine.
- How does DANE / TLSA relate to certificate chains?
- TLSA records publish a fingerprint of your certificate (or your cert's public key) in DNSSEC-signed DNS, letting clients verify the cert binding via DNS instead of (or in addition to) the public CA chain. Most useful for SMTP DANE; browser support for DANE is essentially nonexistent in 2026. See the TLSA record guide for the format details.
Connect certificate validation with DNS
Follow the DNS-01 guide to understand the TXT records used for certificate issuance.
Read the DNS-01 guide