If you are using a self-signed SSL certificate in cPanel and encountering the error:
depth_zero_self_signed_cert
it means that the certificate is not trusted by clients because no Certificate Authority (CA) has verified it.
Alternatively, check from the terminal:
openssl s_client -connect yourdomain.com:443 -showcerts
Expected output (if self-signed):
verify error:num=18:self-signed certificate
verify return:1
verify error:num=19:self-signed certificate in certificate chain
verify return:1
Restart Apache:
sudo systemctl restart httpd
This will replace the self-signed certificate with a valid one.
If AutoSSL does not work, you can install a third-party SSL.
Save and restart Apache:
sudo systemctl restart httpd
If you must use a self-signed certificate (e.g., for local development), you need to trust it manually.
For Debian/Ubuntu
sudo cp your_certificate.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
For CentOS/RHEL
sudo cp your_certificate.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust
sudo systemctl restart httpd
If you are using a self-signed certificate and cannot install a trusted one, you can disable SSL verification (not recommended for production).
curl -k https://yourdomain.com
git config --global http.sslVerify false
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
Warning: Disabling SSL verification is insecure. Use this only for temporary testing.
| Issue | Fix |
|---|---|
| Self-signed certificate error in cPanel | Run AutoSSL or install a trusted SSL |
| Certificate not trusted | Add it to /usr/local/share/ca-certificates/ and run update-ca-certificates |
| Ignore SSL for debugging | Use curl -k or disable SSL verification temporarily |
Now your cPanel SSL should work correctly!