Creating a single SSL certificate bundle from CA root and intermediate certificates

When you purchase an SSL certificate for a domain, e.g. to secure HTTPS usage with your web server, your certificate download may provide you several files like this:

youdomain.com.crt : this is your domain certificate

Files that look this are the root and intermediate certificates:

USERTrust_RSA_Certification_Authority.crt

Sectigo_RSA_Domain_Validation_Secure_Server_CA.crt

Depending how your SSL vendor supplies these files, the second two files may be provided already bundled in one file or two separate files.

To combine them together into one bundle file, use cat to concat the files:

cat yourdomain_com.crt USERTrustRSAAddTrustCA.crt AddTrustExternalCARoot.crt > domain_com.ca-bundle.crt

Open the file and check that each start and end comment for each cert are on their own line and not on the same line (see here).

Getting started in software development? Make sure you learn and start using version control early

Version control is an important part of software development, all commercial software development projects use some form of version control, these days it’s likely to be git but there are other alternatives. Even if you are working on your own small personal projects, get into the habit of committing your code changes frequently and pushing to a remote repo.

Why would you bother doing this even for personal projects?

  • it gets you used to using a tool like git, before using it on a larger project
  • you can checkout any previous commit if something breaks and you need to roll back changes
  • if you’re pushing to a remote repo you also have a remote backup