What Is an SSL Certificate Chain? How It Works

By Benish Parvaiz·

An SSL certificate chain helps browsers and other clients verify that a website's digital certificate can be trusted. When you visit a website over HTTPS, your browser checks its TLS certificate to confirm that it identifies the requested domain and can be validated through a trusted Certificate Authority (CA). This verification often depends on a chain of certificates connecting the website's certificate to a trusted root certificate. If an intermediate certificate is missing or the chain cannot be validated, users may encounter security warnings or connection errors. Understanding how an SSL certificate chain works helps website owners, system administrators, and security professionals troubleshoot certificate issues and maintain reliable HTTPS connections.

What Is an SSL Certificate Chain?

What Is an SSL Certificate Chain?

An SSL certificate chain, also called a certificate chain of trust, is a sequence of digital certificates that establishes a path from a website's certificate to a trusted root Certificate Authority. Although SSL remains a common term, modern HTTPS connections use Transport Layer Security (TLS).

A typical chain contains three types of certificates: the website's leaf certificate, one or more intermediate certificates, and a root certificate. The leaf certificate identifies the website or server. Intermediate certificates allow certificate issuance to be delegated, while the root certificate serves as a trust anchor when trusted by the client.

For example, when a browser connects to an HTTPS website, it validates the website's certificate and attempts to build a trusted path through the available intermediate certificates to a root certificate in its trust store. It also checks the hostname, validity dates, digital signatures, and other applicable certificate requirements.

A valid certificate chain helps establish the server's identity during the TLS handshake. However, it does not prove that a website is legitimate, free from malware, or operated by a trustworthy organization.

How Does the SSL Certificate Chain of Trust Work?

What Is an SSL Certificate Chain?

The certificate chain of trust allows browsers and other clients to validate a website's certificate using certificates issued by trusted authorities. Each certificate links to an issuing authority, creating a path from the website's certificate to an acceptable trust anchor.

Step 1: The Website Presents Its Certificate

When a browser connects to a website over HTTPS, the server presents its leaf certificate during the TLS handshake. This certificate contains the website's public key, domain information, issuer details, validity period, and digital signature.

The browser checks whether the requested hostname matches the certificate's Subject Alternative Name (SAN) entries and whether the certificate satisfies the applicable validation requirements.

Step 2: The Intermediate Certificate Establishes the Next Link

The website's certificate is commonly issued by an intermediate CA rather than directly by a root CA. The client uses the intermediate certificate's public key to verify the signature on the leaf certificate.

Some chains contain multiple intermediate certificates. Each link must satisfy the relevant certificate-validation rules for the client to build a trusted path.

Step 3: The Chain Reaches a Trusted Root

A root certificate belongs to a root Certificate Authority and is commonly self-signed. Browsers and operating systems maintain trusted root certificates according to their own trust policies.

The client attempts to connect the leaf certificate through the required intermediate certificates to a trusted root. The server normally does not need to send the root certificate because the client already has its trust information.

Step 4: The Client Validates the Chain

The client checks the certificate signatures, validity periods, hostname, certificate constraints, and other applicable requirements. Depending on its configuration, it may also check certificate revocation information.

If the client builds a valid path and the required checks pass, it can accept the server's certificate. Otherwise, the connection may produce a certificate warning or fail.

Root Certificate vs. Intermediate Certificate vs. Leaf Certificate

What Is an SSL Certificate Chain?

Each certificate in the chain has a specific purpose. Understanding these differences helps administrators configure HTTPS correctly and troubleshoot certificate errors.

1. Leaf Certificate

A leaf certificate, also called an end-entity certificate, identifies a website or server. It contains the public key, domain information, issuer, validity dates, and digital signature.

The server presents this certificate to the client during the TLS handshake. The client checks its identity and validity before accepting it for the connection.

2. Intermediate Certificate

An intermediate certificate belongs to a subordinate Certificate Authority that issues certificates or delegates issuance to another authority. It connects the website's certificate to a trusted root certificate.

Intermediate CAs allow root CAs to keep their private keys more isolated while delegating certificate issuance. If a required intermediate certificate is missing and cannot be obtained through another available mechanism, the client may be unable to validate the chain.

3. Root Certificate

A root certificate belongs to a root Certificate Authority and acts as a trust anchor when accepted by a client's trust store. It is commonly self-signed, but being self-signed does not automatically make a certificate trusted.

The client must recognize the root as trusted under its configured trust policy.

Feature

Leaf certificate

Intermediate certificate

Root certificate

Main purpose

Identifies the website

Delegates certificate issuance

Acts as a trust anchor

Issued by

Usually an intermediate CA

A root or another intermediate CA

Commonly self-signed

Contains a public key

Yes

Yes

Yes

Sent by the server

Yes

Usually, when required

Normally not required

Role in validation

Establishes the server's certified identity

Connects the leaf to the trust anchor

Establishes client trust

A typical chain therefore follows this path:

Website certificate → Intermediate CA certificate → Trusted root certificate

The exact chain depends on the Certificate Authority, server configuration, and certificates available to the client.

How Browsers Validate an SSL Certificate Chain

Browsers validate certificate chains during the TLS handshake to determine whether the server's identity can be trusted.

Hostname Verification

The browser checks whether the requested domain matches the certificate's SAN entries. A certificate issued for example.com may not cover shop.example.com unless the additional hostname or an appropriate wildcard is included.

A hostname mismatch can trigger a browser warning or cause the connection to be rejected.

Digital Signature Verification

Digital signatures help clients verify certificate integrity and authenticity within the certification path. The client uses the issuing certificate's public key to verify the signature on the certificate being examined.

Cryptographic operations are central to this process. For a related explanation, read CyberLad's guide to hashing in cybersecurity.

Certificate Expiration

Certificates have validity periods defined by their Not Before and Not After fields. The client checks whether the relevant certificates are valid at the time of verification.

An expired leaf or intermediate certificate can prevent successful validation. Administrators should monitor expiration dates and confirm that renewed certificates have been installed correctly.

Trust Store and Certificate Path

The client attempts to build a valid path from the leaf certificate through the intermediate certificates to an acceptable trust anchor. It also checks applicable certificate constraints and key usage requirements.

Trust stores vary by operating system, browser, and application. A certificate trusted in one environment may not be trusted in another.

Certificate Revocation

Certificates can be revoked before their expiration date if their private keys are compromised or other conditions require revocation. Certificate Authorities can publish revocation information through Certificate Revocation Lists (CRLs) or the Online Certificate Status Protocol (OCSP).

Revocation-checking behavior varies across clients. Some use cached information or alternative mechanisms, so successful chain validation does not always mean that every client performed identical revocation checks.

Common SSL Certificate Chain Errors and Their Causes

What Is an SSL Certificate Chain?

Certificate-chain errors occur when a client cannot validate the certificate presented by a server. Identifying the specific error is essential because each problem requires a different fix.

1. Incomplete Certificate Chain

An incomplete chain occurs when the server does not provide a required intermediate certificate and the client cannot build a trusted path using other available certificates.

Common causes include missing intermediate certificates, incorrect certificate bundles, and configuration changes following a server migration.

How to fix it: Obtain the correct intermediate certificates from your Certificate Authority and configure the server to present the leaf certificate followed by the required intermediates.

2. Untrusted Certificate Authority

A client may reject a chain when it cannot connect the certificate to an acceptable trust anchor. This can happen with self-signed certificates or private CA certificates that have not been installed in the client's trust store.

How to fix it: Use a publicly trusted CA for public websites. For internal applications, distribute the organization's root certificate through an approved trust-management process. Never install an unknown root certificate merely to bypass a warning.

3. Expired Certificate

An expired leaf or intermediate certificate can prevent successful validation.

How to fix it: Check the validity dates, renew or replace the affected certificate, and ensure the updated certificate chain is installed at every relevant TLS termination point.

4. Hostname Mismatch

A hostname mismatch occurs when the requested domain is not covered by the certificate's SAN entries.

How to fix it: Install a certificate that covers the requested hostname. Review virtual-host settings, Server Name Indication (SNI), and load-balancer certificate bindings.

5. Incorrect Certificate Bundle

A server may present the wrong intermediate certificate or an incorrectly ordered certificate bundle.

How to fix it: Compare the leaf certificate's issuer with the configured intermediate certificates. Correct the bundle and test the server configuration before reloading the service.

6. Revocation or Other Validation Failure

A certificate may fail validation because it has been revoked or does not satisfy another applicable certificate requirement.

How to fix it: Check the certificate's status and consult the issuing CA's instructions. Replace a revoked certificate and investigate the cause. Disabling certificate verification is not a safe solution.

How to Check an SSL Certificate Chain

You can inspect a public website's certificate chain using an online testing service or command-line tools.

Method 1: Use SSL Labs

Qualys SSL Labs SSL Server Test analyzes publicly accessible TLS servers and reports certificate and configuration issues.

  1. Open the SSL Labs testing page.

  2. Enter the domain you want to inspect.

  3. Run the test and wait for the analysis.

  4. Review the certificate details and chain information.

  5. Investigate warnings about trust, expiration, missing intermediates, or hostname validation.

SSL Labs is useful for external testing without installing additional software. Avoid submitting sensitive internal hostnames or systems unless your organization's policies permit using an external service.

Method 2: Inspect Certificates with OpenSSL

OpenSSL can display certificates presented by a server during a TLS connection. Run:

openssl s_client -connect example.com:443 \
  -servername example.com \
  -showcerts

Replace example.com with the target domain.

The -connect option specifies the destination and port. The -servername option sends the hostname through SNI, while -showcerts displays the certificates sent by the server.

Important: Displaying certificates does not prove that the chain is trusted. Use verification options to check the certificate path and hostname.

Method 3: Verify the Chain and Hostname

Run the following command to request certificate verification and hostname checking:

openssl s_client \
  -connect example.com:443 \
  -servername example.com \
  -verify_return_error \
  -verify_hostname example.com

Look for a successful verification result, such as Verify return code: 0 (ok). Exact output depends on the OpenSSL version, trust store, and verification settings.

The -verify_return_error option causes verification errors to be returned instead of allowing the command to continue after them. See the official OpenSSL s_client documentation.

Method 4: Inspect Issuer and Expiration Details

If you have saved the leaf certificate as a PEM file, run:

openssl x509 -in certificate.pem -noout \
  -subject -issuer -dates

This displays the certificate's subject, issuer, and validity dates. Use the output to check whether the issuer matches the expected CA and whether the certificate is within its validity period.

How to Fix an Incomplete SSL Certificate Chain

What Is an SSL Certificate Chain?

Fixing an incomplete chain generally involves identifying the missing intermediate, obtaining the correct certificate bundle, configuring the TLS endpoint, and testing the result.

Step 1: Identify the Missing Intermediate

Run the OpenSSL command above or use SSL Labs to examine the chain. Check which certificates the server sends and whether the client can build a trusted path.

A verification failure does not always mean an intermediate is missing. Also investigate expiration, hostname mismatches, and trust-store issues.

Step 2: Obtain the Correct Certificate Bundle

Download the required intermediate certificates from your Certificate Authority's official website or certificate-management portal. Confirm that the certificates correspond to the issuer of your leaf certificate.

The root certificate is normally already available in the client's trust store and generally does not need to be included in the server's certificate bundle.

Step 3: Configure Nginx

For Nginx, the certificate file should contain the leaf certificate first, followed by the required intermediate certificates.

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate     /etc/ssl/certs/fullchain.pem;
    ssl_certificate_key /etc/ssl/private/example.com.key;
}

The paths are examples. Use the correct locations for your environment and ensure the private key is protected by appropriate permissions.

Test the configuration before reloading Nginx:

sudo nginx -t

Step 4: Check Apache and Other TLS Endpoints

Apache configurations can use SSLCertificateFile to provide the leaf certificate and necessary intermediate certificates. Follow the documentation for your Apache version and deployment.

If HTTPS terminates at a reverse proxy, content delivery network, web application firewall, or load balancer, check the certificate installed at that layer. Updating only the origin server will not fix an incorrect certificate served by a separate proxy.

Step 5: Verify the Fix

After making the changes, rerun OpenSSL and SSL Labs. Confirm that the server presents the expected certificates and that the client can validate the chain and hostname.

For environments with multiple servers or TLS termination points, test each relevant endpoint. A successful result on one server does not guarantee that all endpoints have the same configuration.

SSL Certificate Chain Best Practices

Use Trusted Certificate Authorities

Use publicly trusted CAs for public websites. For internal applications, distribute private CA trust securely to authorized clients.

Automate Renewal and Monitoring

Use certificate-management tools where supported, and alert administrators before certificates expire. Verify that renewed certificates are actually deployed and served by the relevant endpoints.

Protect Private Keys

Restrict access to certificate private keys, store them securely, and avoid exposing them in logs or public repositories. If a key is compromised, replace the affected certificate and follow the appropriate incident-response and revocation procedures.

Validate After Configuration Changes

Test the certificate chain after renewals, server migrations, load-balancer changes, or reverse-proxy updates. Check hostname matching, expiration, chain construction, and verification errors.

Maintain a Certificate Inventory

Record certificate owners, domains, issuing CAs, expiration dates, deployment locations, and renewal methods. A centralized inventory helps teams find affected services quickly during outages.

Monitor Third-Party Certificates

Certificate problems can affect services your organization depends on, not just your own website. Monitor important external TLS endpoints, including identity providers, payment gateways, and APIs. CyberLad explains this wider risk in Five Third-Party Risks Your Vulnerability Scanner Can't See.

Use Secure TLS Configurations

A valid certificate chain is only one part of HTTPS security. Use supported TLS versions, appropriate cryptographic settings, and secure key-management practices. A trusted certificate does not guarantee that an application is free from vulnerabilities.

Conclusion

An SSL certificate chain is an essential part of HTTPS security because it allows browsers and other clients to validate a website's certificate through a path to a trusted Certificate Authority. Understanding leaf, intermediate, and root certificates helps administrators troubleshoot incomplete chains, expired certificates, and trust errors. Regular monitoring, correct server configuration, secure private-key management, and post-deployment verification help maintain reliable TLS connections. By following these practices, website owners and security professionals can reduce certificate-related disruptions and improve the reliability of their HTTPS infrastructure.

Frequently Asked Questions

What Is an SSL Certificate Chain?

An SSL certificate chain is a sequence of digital certificates that establishes a path from a website's certificate to a trusted root Certificate Authority. It commonly includes the leaf certificate and one or more intermediate certificates.

What Is the Difference Between a Root and Intermediate Certificate?

A root certificate acts as a trust anchor when accepted by the client. An intermediate certificate delegates certificate issuance and connects the leaf certificate to the trusted root.

Does a Web Server Need to Send the Root Certificate?

Usually, no. The server normally sends its leaf certificate and the required intermediate certificates. The client generally already has its trusted root certificate in its trust store.

How Can I Check an SSL Certificate Chain?

Use SSL Labs to inspect a public website, or run openssl s_client to examine the certificates presented by a server. Include hostname and certificate verification options when checking whether the chain can be trusted.

What Causes an Incomplete SSL Certificate Chain?

The most common cause is a missing intermediate certificate. Incorrect certificate bundles, outdated configurations, and inconsistent TLS settings across servers can also prevent clients from building a valid certification path.

How Do I Fix an Incomplete Certificate Chain?

Obtain the correct intermediate certificates from the CA, configure the server to present the leaf certificate followed by the necessary intermediates, and test the updated configuration. The precise steps depend on the server software and TLS termination point.

Is an SSL Certificate Chain the Same as an SSL Certificate?

No. A certificate contains information about a website's identity and public key. The chain is the sequence of certificates used to establish a trusted path from that certificate to an acceptable trust anchor.

Does a Valid Certificate Chain Mean a Website Is Safe?

No. A valid chain helps verify a website's certified identity under the client's trust policy. It does not guarantee that the website is legitimate, free from malware, or protected against application vulnerabilities.

Ready to Get Protected?

Start Your Security Journey Today

Get a free consultation with our cybersecurity experts. No commitment required.