# What Is Certificate Chain? Definition and Examples

> Certificate chains are ordered lists of certificates, from a server's leaf through intermediates to a trusted root, each signed by the next.

Source: https://ssl.sh/glossary/certificate-chain/
Last updated: 2026-11-10

A certificate chain is the sequence of certificates a client uses to connect a server's leaf certificate to a [root certificate](https://ssl.sh/glossary/root-certificate/) in its [trust store](https://ssl.sh/glossary/trust-store/). Each certificate's issuer name matches the subject of the next one, and each signature verifies with the next certificate's public key. The server sends the leaf plus intermediates; the client supplies the root and builds the path itself.

## Why it matters
Path validation checks every link: signatures, validity dates, basic constraints, name constraints, key usage and, where available, revocation status. If an intermediate is missing, expired or out of order, clients report errors such as "unable to get local issuer certificate". Because of [cross-signing](https://ssl.sh/glossary/cross-signing/) a certificate can have more than one valid path, and different clients may pick different ones, which is why the same site can work on a new phone but fail on an old one.

## Example
```bash
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null
```

Look at the numbered `s:` (subject) and `i:` (issuer) lines: each `i:` should equal the `s:` of the next certificate.

## Common misconceptions
- **The root must be included in the chain file.** It is optional and is not trusted just because the server sends it; leaf plus intermediates is enough.
- **The order of certificates does not matter.** Put the leaf first, then each issuer in turn; some clients tolerate disorder, others do not.
- **A valid chain means the certificate matches the hostname.** Chain validation and hostname checking are separate steps, and both must pass.

## Related terms

- [中间证书](https://ssl.sh/zh/glossary/intermediate-certificate/): 中间证书是由根证书（或上级中间证书）签发、用来签发网站证书的 CA 证书，服务器必须把它和网站证书一起发送给客户端。
- [根证书](https://ssl.sh/zh/glossary/root-certificate/): 根证书是位于证书链顶端、由 CA 自签名的证书，预装在操作系统或浏览器的信任库中，作为验证其他证书的信任锚。
- [信任库](https://ssl.sh/zh/glossary/trust-store/): 信任库是操作系统、浏览器或编程语言运行时内置的一组根 CA 证书，验证证书链时以它们作为信任锚。
- [交叉签名](https://ssl.sh/zh/glossary/cross-signing/): 交叉签名是指由一个已被广泛信任的 CA 为另一个 CA 的现有密钥签发证书，使后者签发的证书也能链到老设备信任的根。
- [fullchain](https://ssl.sh/zh/glossary/fullchain/): fullchain 是依次包含站点证书和中间证书的 PEM 文件，让客户端能把站点证书连到受信任的根证书。
- [AIA](https://ssl.sh/zh/glossary/aia/): AIA 即颁发机构信息访问，是 X.509 证书扩展，提供签发 CA 证书的下载地址，以及（可选的）该 CA 的 OCSP 服务地址。
- [CA Bundle](https://ssl.sh/zh/glossary/ca-bundle/): CA Bundle 是把多张 PEM 证书拼接在一起的文件，既可能是服务器要发送的中间证书链，也可能是客户端信任的根证书集合。
