SSL certificate files - no .ca file
Categories:
Understanding SSL Certificate Files Without a .ca File

Demystify the common SSL certificate file types and how to configure your web server when a separate .ca
(Certificate Authority) file is not explicitly provided.
When setting up SSL/TLS for a web server, you typically receive several certificate files from your Certificate Authority (CA). These usually include your server certificate, an intermediate certificate, and sometimes a root certificate. A common point of confusion arises when a dedicated .ca
file is not provided, leading to questions about how to properly configure the server. This article will clarify the roles of these files and guide you through common configurations, especially when dealing with bundled certificates.
The Role of Certificate Files
SSL/TLS certificates establish a chain of trust from your server's certificate back to a trusted root CA. This chain ensures that clients can verify the authenticity of your server. The primary files involved are:
- Server Certificate (e.g.,
yourdomain.crt
,yourdomain.pem
): This is your domain's specific certificate, issued by the CA. It contains your public key and is signed by an intermediate CA. - Intermediate Certificate (e.g.,
intermediate.crt
,intermediate.pem
): This certificate acts as a bridge, signing your server certificate and being signed by the root CA. There can be one or more intermediate certificates forming a chain. - Root Certificate (e.g.,
root.crt
,root.pem
): This is the self-signed certificate of the Certificate Authority, trusted by default in most operating systems and browsers. It's the anchor of trust for the entire chain.
Often, CAs will provide these files separately or bundle the intermediate and root certificates into a single file, sometimes referred to as a 'CA bundle' or 'chain file'. The key is to provide the entire chain of trust to the web server so that clients can validate it.
flowchart TD A["Client Browser"] B["Your Web Server"] C["Your Server Certificate"] D["Intermediate CA Certificate(s)"] E["Root CA Certificate"] A -- "Requests SSL/TLS Handshake" --> B B -- "Sends Certificate Chain" --> A B --> C C --> D D --> E A -- "Verifies Chain of Trust" --> E E -- "Trusted by OS/Browser" --> A
SSL/TLS Certificate Chain of Trust Flow
Common Scenarios and Configurations
When you don't receive a file explicitly named .ca
or ca-bundle.crt
, it usually means the intermediate and potentially the root certificates are combined into another file, or your server software expects them to be concatenated. The goal is always to present the client with your server certificate followed by all intermediate certificates, up to (but usually not including) the root certificate, which is typically already trusted by the client's system.
Scenario 1: Intermediate and Root Certificates in a Single File
Many CAs provide a single file containing all necessary intermediate certificates, and sometimes the root. This file might be named chain.crt
, ca-bundle.crt
, or similar. In this case, you'll typically have your server certificate (yourdomain.crt
) and this chain file.
Scenario 2: Concatenating Certificates Manually
If you receive multiple intermediate certificates (intermediate1.crt
, intermediate2.crt
) and no explicit bundle, you might need to concatenate them into a single file. The order is crucial: your server certificate, followed by the intermediate certificates in order, leading up to the root. The root certificate itself is often omitted from the server's configuration as clients usually have it pre-installed.
Scenario 3: All Certificates in One File (Less Common for Server Config)
Sometimes, a CA might provide a single .pem
file that contains your private key, your server certificate, and the entire chain. While convenient for some applications, web servers usually prefer these components to be separate.
Configuring Your Web Server
The configuration varies slightly depending on your web server software. The key is to point the server to your private key, your server certificate, and the certificate chain (which may or may not include the root).
Apache HTTP Server
Apache uses the SSLCertificateFile
directive for your server certificate and SSLCertificateChainFile
for the intermediate certificates. If you have a single file containing both, you can often use SSLCertificateFile
for the combined file, but SSLCertificateChainFile
is preferred for clarity and compatibility.
Nginx
Nginx uses the ssl_certificate
directive for both your server certificate and the intermediate chain. You concatenate your server certificate and the intermediate certificates into a single file.
Other Servers
Other servers like IIS, Tomcat, or Node.js applications will have their own specific directives, but the underlying principle of providing the server certificate and its chain remains the same.
Apache
Apache configuration (httpd.conf or virtual host file)
<VirtualHost *:443> ServerName yourdomain.com SSLEngine on SSLCertificateFile /etc/ssl/certs/yourdomain.crt SSLCertificateKeyFile /etc/ssl/private/yourdomain.key # If you have a separate chain file (e.g., ca-bundle.crt) SSLCertificateChainFile /etc/ssl/certs/ca-bundle.crt # OR if yourdomain.crt contains the full chain (server + intermediates) # SSLCertificateFile /etc/ssl/certs/yourdomain_fullchain.crt
Nginx
Nginx configuration (nginx.conf or site-specific config)
server { listen 443 ssl; server_name yourdomain.com;
ssl_certificate /etc/ssl/certs/yourdomain_fullchain.crt; # Contains server cert + intermediates
ssl_certificate_key /etc/ssl/private/yourdomain.key;
# Other SSL settings...
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers on;
}
ssl_certificate
file should contain your server certificate followed by all intermediate certificates, concatenated into a single file. The root certificate is typically not included here.1. Identify Your Certificate Files
Locate the files provided by your CA. You should have at least your private key (.key
) and your server certificate (.crt
or .pem
). Look for any other .crt
or .pem
files that might contain intermediate certificates or a CA bundle.
2. Examine Certificate Contents
Open the .crt
or .pem
files with a text editor. Certificates are Base64 encoded and start with -----BEGIN CERTIFICATE-----
and end with -----END CERTIFICATE-----
. If a file contains multiple such blocks, it's a bundle. You can use openssl x509 -in yourfile.crt -text -noout
to inspect individual certificates.
3. Create a Full Chain File (if necessary)
If your CA provided separate server and intermediate certificates, or multiple intermediate certificates, concatenate them into a single file. The order is critical: your server certificate first, then intermediate(s) in order of signing, e.g., cat yourdomain.crt intermediate1.crt intermediate2.crt > yourdomain_fullchain.crt
.
4. Configure Your Web Server
Update your web server's SSL configuration to point to your private key and the appropriate certificate file(s). Use the examples above for Apache or Nginx as a guide.
5. Test Your SSL Configuration
After restarting your web server, use an online SSL checker tool (e.g., SSL Labs SSL Server Test) to verify that your certificate chain is correctly installed and trusted. This will confirm that clients can establish a secure connection without errors.