HTTPS troubleshooting guide
This topic summarizes common issues and troubleshooting methods related to CDN HTTPS configuration, including certificate upload errors, HTTPS access exceptions, device compatibility, and HTTPS performance optimization.
Symptom quick reference
First locate the troubleshooting entry based on the phenomenon observed on the client, and then follow the steps in the corresponding section to troubleshoot item by item.
Symptom or error | Common cause | Troubleshooting entry |
An error is reported when you upload a certificate in the console | The certificate or private key is in an invalid format, the two do not match, or the certificate has expired | |
HTTPS access fails while HTTP access works | No certificate is configured on CDN, or the certificate is invalid or does not match the domain name | |
The browser reports | The client and the CDN node have no common TLS protocol version or cipher suite | |
The browser displays "Not secure" or a certificate risk warning | The certificate chain is incomplete, the certificate has expired, a self-signed certificate is used, or the page contains mixed content | |
HTTP access is not automatically redirected to HTTPS | The force redirect feature is not enabled after the certificate is configured | |
Some legacy devices or IoT devices cannot access over HTTPS | The client does not support SNI, or the certificate chain is incomplete | |
HTTPS access is slow or the TLS handshake takes a long time | OCSP query timeout, oversized certificate chain, early TLS protocol version, or remote DNS scheduling |
How do I determine whether the issue is at the HTTPS configuration layer?
If you encounter HTTPS-related issues when using a CDN-accelerated domain name, use the following approach to locate the issue layer:
Errors during certificate configuration: If the console directly reports an error when you upload or select a certificate, the issue is related to certificate configuration. See Certificate configuration and upload errors.
HTTPS access fails but HTTP works: If the domain name is accessible over HTTP but fails over HTTPS or a certificate error is reported, an SSL certificate is usually not configured on CDN or the certificate configuration is incorrect. See HTTPS access exceptions.
Browser certificate risk warnings: If HTTPS access works but the browser displays "Not secure" or a certificate risk warning, the issue is related to certificate validity or mixed content on the web page. See Certificate risk warnings on websites.
Access fails on specific devices: If most devices work normally but specific devices (such as legacy operating systems that are no longer maintained or some IoT devices) cannot access over HTTPS, the issue is usually related to SNI compatibility. See Device and client compatibility.
HTTP is not automatically redirected to HTTPS: If an HTTPS certificate is configured and HTTPS access works, but HTTP access is not automatically redirected to HTTPS, the issue is related to the redirect configuration. See Force HTTPS redirect.
Origin fetch over HTTPS fails: If clients can access CDN normally but CDN returns 5xx errors during origin fetch or origin certificate validation fails, the issue is related to the origin fetch configuration. See Troubleshooting guide about origin fetch.
Certificate configuration and upload errors
HTTPS access exceptions
Force HTTPS redirect
Device and client compatibility
HTTPS performance optimization
Common diagnostic commands
The following commands help you quickly diagnose HTTPS configuration issues. You can run them on your local terminal.
View the certificate information deployed on the CDN node: Outputs the domain name (subject), issuer, and validity period (dates) of the certificate. You can quickly confirm whether the correct certificate is deployed on the CDN node.
openssl s_client -connect <accelerated domain name>:443 -servername <accelerated domain name> < /dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -datesView the complete certificate chain: Outputs the complete certificate chain. Used to check whether the intermediate certificates are complete.
openssl s_client -connect <accelerated domain name>:443 -servername <accelerated domain name> -showcerts < /dev/null 2>/dev/nullView the TLS handshake details of an HTTPS request: Outputs key information such as the TLS version, certificate subject, issuer, and expiration time.
curl -vI https://<accelerated domain name> 2>&1 | grep -E "SSL|subject|issuer|expire|TLS|HTTP/"Check the validity period of a certificate:
openssl x509 -in <certificate file> -noout -datesVerify whether the certificate and private key match (generic method): If the MD5 values of the two output lines are identical, the certificate and private key match.
openssl x509 -pubkey -noout -in <certificate file> | openssl md5
openssl pkey -pubout -in <private key file> | openssl md5Check whether the domain name resolution points to CDN: The output should be the IP addresses pointed to by the CNAME assigned by CDN, not the origin server IP.
dig <accelerated domain name> +shortTrace the HTTP redirect chain: Used to troubleshoot force HTTPS redirect and redirect loop issues.
curl -vIL --max-redirs 10 http://<accelerated domain name> 2>&1 | grep -E "< HTTP|< Location"