Updating a Certificate
For website services connected to AAD, if Protocol/Port is set to HTTPS/WebSockets and Origin Server Type is set to IP address, you need to upload a certificate (only TLS 1.0, TLS 1.1, and TLS 1.2 certificates are supported) to associate the certificate with the protected domain name.
- If the purchased certificate is about to expire, you are advised to purchase a new certificate before the expiration date and update the certificate associated with the domain name in AAD.
- To update the certificate associated with a domain name, you can associate a new certificate with the domain name in AAD.
- The certificate takes effect 1 minute after it is updated. Therefore, update certificates in off-peak hours.
- If a certificate expires, the origin server will be affected more severely than the host crash and website access failure. Therefore, you are advised to update the certificate before the certificate expires.
- Each domain name must be associated with a certificate. A wildcard domain name can only be used for a wildcard domain certificate. If you have not purchased a wildcard domain certificate and have only a single-domain certificate, you can only add domain names one by one in AAD.
Prerequisites
Website services have been connected to AAD.
Procedure
- Log in to the management console.
- Follow the procedure shown in the following figure to enter the Domain Name Access page. Figure 1 Domain Name Access page
- Locate the row that contains the target domain name, and click Update in the Service Type column.
- In the displayed Update Certificate dialog box, upload a new certificate or select an existing certificate.
- If Upload Mode is set to Manually upload, enter the certificate name and paste the certificate content and private key to the target text box, as shown in Figure 2.
AAD encrypts and saves the private key file to ensure its security.
Currently, AAD only supports PEM certificates. If the certificate is not in .pem format, before uploading it, convert it to .pem format by referring to Table 1.Table 1 Certificate format conversion commands Format
Conversion Method
CER/CRT
Rename the cert.crt certificate file to cert.pem.
PFX
Use OpenSSL to convert the certificate.
Obtain a private key. For example, run the following command to convert cert.pfx into cert.key:
openssl pkcs12 -in cert.pfx -nocerts -out cert.key -nodes
Obtain a certificate. For example, run the following command to convert cert.pfx into cert.pem:
openssl pkcs12 -in cert.pfx -nokeys -out cert.pem
P7B
Use OpenSSL to convert the certificate.
- Run the following command to convert the certificate: openssl pkcs7 -print_certs -in incertificat.p7b -out cert.cer
- Obtain the certificate content in cert.cer.
- Save the content in .pem format.
DER
Use OpenSSL to convert the certificate.
- Obtain a private key. For example, run the following command to convert privatekey.der into privatekey.pem:
openssl rsa -inform DER -outform PEM -in privatekey.der -out privatekey.pem
- Obtain a certificate. For example, run the following command to convert cert.cer into cert.pem:
openssl x509 -inform der -in cert.cer -out cert.pem
- If Upload Mode is set to Select an existing certificate, select the uploaded certificate from the Certificate drop-down list. Figure 3 Selecting an existing certificate
- If Upload Mode is set to Manually upload, enter the certificate name and paste the certificate content and private key to the target text box, as shown in Figure 2.
- Click OK.

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.