Last reviewed by Netlify Support: November 2024
Hi there! While it’s not a very common occurrence, you may decide to bring your own custom TLS/SSL certificate to provide HTTPS for your Netlify site. Here are some tips that might be helpful in that instance. Also, our HTTPS (SSL) docs include guidelines on what you’ll need to enter in the Netlify app and where to go to enter it.
If you’re stuck with questions about how to format those items, or you need to work with your external certificate provider to troubleshoot the custom cert, here are some tips on how to format the items you’ll need to enter in the Netlify app and the information they need to contain:
-
The certificate itself, in X.509 PEM format (usually a .crt file)
Although a certificate in a PEM format is encrypted, the certificate itself should include
Issuer
andSubject
fields. TheSubject
field must include aCN
(CommonName) attribute with a value of at least one of the names shown in your sites’ Domains settings page. To confirm those values in the Netlify UI, go to your site, then Site configuration > Domain management > Domains > Custom domains.The PEM-formatted contents of the certificate should start with something like:
-----BEGIN CERTIFICATE----- MIIGbDCCB
and end with something like:
....A== -----END CERTIFICATE-----
-
The private key you used to request the certificate
The private key should start with something like:
-----BEGIN PRIVATE KEY----- MIIEvQIBADANB
and end with something like:
....nQjRDxA= -----END PRIVATE KEY-----
-
A chain of intermediary certificates from your Certificate Authority (CA)
This should be a single file, but it may be several certificates concatenated together in the file. Note there may be many similar stanzas in the same file, or only one; both ways can be valid. This should start with something like:
-----BEGIN CERTIFICATE----- MIIE
and end with something like:
E4f97Q= -----END CERTIFICATE-----
We hope this helps you get your custom certificate set up successfully - it’s a fairly uncommon circumstance, but can be tricky without guidance.
If you have questions or need more clarity, please comment below!