HTTPS settings
HTTPS encrypts traffic between visitors and edge nodes. Before you turn it on, prepare a certificate that covers the domain in the Certificate Center.
Entry point: CDN › Static acceleration management (静态加速管理) › the domain's Manage (管理) › HTTPS configuration (HTTPS 配置).
You can't make changes while the domain is Stopped (已停止). After each change, the status becomes Deploying (部署中), which usually takes 30 seconds, and the change takes effect once the status returns to Running (运行中).
Turn on HTTPS
Prepare a certificate
In Certificate Center › Certificate management (证书中心 › 证书管理) (open), request an auto certificate or upload your own certificate, and wait for the certificate to be deployed.
| Field | Values | Description |
|---|---|---|
| HTTPS configuration | On, Off | When off, HTTPS access is no longer served. |
| Certificate (证书) | Drop-down | Lists only deployed certificates. Each domain uses one certificate. |
| Force redirect (强制跳转) | Off (关闭, default), HTTP to HTTPS › 301 redirect (HTTP 跳转 HTTPS › 301跳转), HTTP to HTTPS › 302 redirect (HTTP 跳转 HTTPS › 302跳转) | Redirects HTTP requests to HTTPS. Browsers remember a 301 for a long time, so use 302 first if you're not sure. |
| HTTP/2 | On, Off | On by default when you first turn on HTTPS. |
After you save, the card shows HTTPS certificate (HTTPS 证书) and Certificate information (证书信息) (validity period).
Certificate checks
The selected certificate is checked when you save:
| Message | What to do |
|---|---|
| "所选证书不包含 …,它包含的域名是 …" (the selected certificate doesn't cover …, the domains it covers are …) | The certificate doesn't cover this CDN domain. Choose another certificate, or request one for this domain. A wildcard certificate *.example.com matches only first-level subdomains, not a.b.example.com. |
| "所选证书已于 … 过期" (the selected certificate expired on …) | Choose another certificate, or renew the certificate and try again. |
| "该证书处于部署中,请等待证书部署成功再操作" (this certificate is deploying, wait until it's deployed) | Wait for the certificate to be deployed. |
| "获取证书失败" (failed to get the certificate) | Refresh the page and select the certificate again. |
TLS version control
On the TLS version control (TLS 版本控制) card, use the switches to select TLSv1.0, TLSv1.1, TLSv1.2, and TLSv1.3. Changes are submitted as soon as you toggle. HTTPS must be on first.
- What you set is a continuous range: from the lowest version that's on to the highest version that's on. Versions in between are always enabled.
- Keep at least one version. Turning all of them off shows "参数不合法" (invalid parameter).
- We recommend enabling only TLSv1.2 and TLSv1.3. Enable TLSv1.0 and TLSv1.1 only when you need to support very old devices.
For example, if you turn on only TLSv1.0 and TLSv1.3, all versions from 1.0 to 1.3 are actually enabled, and after you refresh the page all four switches are on.
OCSP stapling
During the handshake, the edge node attaches the certificate status directly, so visitors don't need to query the certificate authority, which reduces the wait on the first connection. Control it with the switch on the OCSP Stapling card. Changes are submitted as soon as you toggle. HTTPS must be on first.
How settings affect each other
Each time you save the HTTPS configuration card (with HTTPS on), the TLS versions reset to 1.0 to 1.3 and OCSP stapling resets to on. Save the HTTPS configuration first, then adjust TLS versions and OCSP. After you change the certificate, the forced redirect, or HTTP/2, check these two settings again.
- Before you turn off HTTPS, change the
https://addresses in your pages and apps. If you used a 301 redirect before, browsers may still redirect to HTTPS. - After a certificate is updated (automatic renewal, or you modify your own certificate), the CDN domains that use it switch to the new certificate automatically, and you don't need to save again. See Deploy certificates.
Recommended configurations
| Scenario | HTTPS configuration | Force redirect | HTTP/2 | TLS versions | OCSP stapling |
|---|---|---|---|---|---|
| Website and app assets | On | 301 redirect | On | 1.2, 1.3 | On |
| Support for old devices | On | Off | On | 1.0 to 1.3 | On |
FAQ
Are HSTS and HTTP/3 (QUIC) supported?
The console currently has no HSTS or HTTP/3 settings for CDN domains.
Can I configure both RSA and ECC certificates for one domain?
In the console, each domain can select only one certificate, either RSA or ECC. ECC performs better, and RSA is more compatible.
My certificate isn't in the drop-down
The drop-down lists only deployed certificates. Go to Certificate management and check the status of the dot before the certificate name. Certificates that are being requested, being deployed, or failed don't appear.
What happens when a certificate is about to expire?
Auto certificates renew automatically before they expire. For your own certificates, replace them before they expire. An SMS reminder is sent to your account's phone number before expiry.