Troubleshooting: Private Key Is Not Valid
Learn how to identify and resolve issues with invalid private keys
Table of Contents
Ensure the Correct Private Key File Verify the Certificate Concatenation Remove Blank Lines Check DNS SettingsIf you’ve attempted to upload your certificate and private key but encountered an error indicating that the Private Key is not valid, you may need to double-check both the files and configuration. Follow the steps below to troubleshoot this issue.

Ensure the Correct Private Key File
When generating a Certificate Signing Request (CSR), a Private Key is created at the same time. You will send the CSR to your certificate provider and retain the private key. Once you receive the certificate from your provider, you must upload both the certificate and the original private key that was generated.
Make sure that you are using the correct private key file associated with the certificate.
Verify the Certificate Concatenation
To ensure that the certificate is valid, it must be concatenated in the proper order within the bundle file. The certificates should appear in the following sequence:
-----BEGIN CERTIFICATE-----
(Your Primary SSL certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Intermediate certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Your Root certificate)
-----END CERTIFICATE-----
Check that all certificates are placed in the correct order and properly formatted.
Remove Blank Lines
Be sure there are no extra blank lines between each certificate within the bundle file. Blank lines can cause invalid syntax, leading to the certificate failing validation.
Check DNS Settings
Finally, verify that your DNS settings are properly configured. Incorrect DNS records can also result in certificate errors. For detailed guidance on setting up DNS records, refer to this article.
By following these steps, you should be able to resolve the “Private Key is not valid” error. If the problem persists, consider reaching out to your certificate provider for further assistance.