Installing an SSL Certificate on an IIS Server
This topic describes how to install a downloaded certificate on an IIS server. After a certificate is installed, the communication security of your web server is ensured using SSL.
We provide one-to-one professional SSL certificate service for you. You can buy the service in marketplace if needed.
Prerequisites
- The certificate is in the Issued state.
- You have downloaded the SSL certificate. For details, see Downloading a Certificate.
Constraints
- Before installing the certificate, enable port 443 on the server where the SSL certificate is installed and add port 443 to the security group. Otherwise, HTTPS cannot be enabled after the installation.
- If a domain name maps to multiple servers, deploy the certificate on each server.
- The domain name to be run on the target server must be the same as the one associated with the certificate. Otherwise, the web browser will display a message indicating that the domain name is insecure.
Procedure
To install an SSL certificate on an IIS server, perform the following steps:
Step 1: Obtaining Files → Step 2: Configuring IIS → Step 3: Verifying the Result
Step 1: Obtaining Files
Before installing a certificate, obtain the certificate file and password file. Perform the following operations based on the value selected for CSR when applying for a certificate:
- If you select System generated CSR for CSR when applying for a certificate, perform the operations according to the instructions in System generated CSR.
- If you select Upload a CSR for CSR when applying for a certificate, perform the operations according to the instructions in Upload a CSR.
Detailed operations are as follows:
- System generated CSR
- Decompress the downloaded certificate file on your local PC.
- Obtain the SSL certificate file Certificate ID_Domain name bound to the certificate_server.pfx and password file Certificate ID_Domain name bound to the certificate_keystorePass.txt from Certificate ID_Domain name bound to the certificate_IIS.
The password file keystorePass.txt contains the initial random password generated by the service. To ensure system security, you are advised to change the password. You can change the password when converting the certificate format. For more details, see What Are Mainstream Formats of Digital Certificates?
- Upload a CSR
- Decompress the downloaded certificate package to obtain the Certificate ID_Domain name bound to the certificate_server.pem file.
The Certificate ID_Domain name bound to the certificate_server.pem file contains two segments of certificate codes -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----, which are the server certificate and intermediate CA certificate respectively.
- Use OpenSSL to convert the PEM certificate into a PFX certificate and obtain the server.pfx file.
- Save the PEM certificate and the private key server.key generated during CSR generation to the bin directory in the OpenSSL installation directory.
- In the bin directory of the OpenSSL installation directory, run the following command to convert the PEM certificate into a PFX certificate and press Enter:
openssl pkcs12 -export -out server.pfx -inkey server.key -in Certificate ID_Domain name bound to the certificate_server.pem
The command output is as follows:
Enter Export Password:
- Enter the password of the PFX certificate and press Enter.
The password is user-defined. Set it as required.
The command output is as follows:
Verifying - Enter Export Password:
Record the password of the PFX certificate. The password of the JKS certificate must be the same as that of the PFX certificate. Otherwise, the IIS service may fail to start.
To improve password security, set the password based on the following rules:
- Consists of 8 to 32 characters.
- Must contain at least three types of the following characters: uppercase letters, lowercase letters, digits, and special characters ~`!@#$%^&*()_+|{}:"<>?-=\[];',./
- Re-enter the password of the PFX certificate and press Enter.
If no error information is displayed, the server.pfx file has been generated in the OpenSSL installation directory.
- Create a keystorePass.txt file in the OpenSSL installation directory and save the password of the PFX certificate in the file.
- Decompress the downloaded certificate package to obtain the Certificate ID_Domain name bound to the certificate_server.pem file.
Step 2: Configuring IIS
- Install IIS as instructed by IIS guides.
- Open the IIS management console, double-click Server Certificates. Figure 2 Double-clicking Server Certificates
- In the displayed dialog box, click Import. Figure 3 Import
- Import the server.pfx certificate file. Then click OK.
In the Password box, enter the password provided in the keystorePass.txt file.
Figure 4 Importing a PFX certificate file
- Right-click the target site (the default site is used as an example). Choose Edit Bindings from the shortcut menu. Figure 5 Choosing Edit Bindings
- In the dialog box that is displayed, click Add. Then enter the following information. Figure 6 Binding a website
- Type: Select https.
- Port: Retain the default port 443.
- SSL certificate: Select the certificate imported in 4.
- Click OK.
Verifying the Result
After the deployment succeeds, in the address bar of the browser, enter https://Domain name and press Enter.
If a security padlock is displayed in the address bar of the browser, the certificate has been installed successfully.
- If the browser still displays a message indicating that the website is insecure, fix the issue by referring to Why Does the Website Still Display a Message Indicating that the Website Is Insecure After an SSL Certificate Is Deployed?
- If the website cannot be accessed using a domain name, fix the issue by referring to Why Is My Website Inaccessible by Domain Name After an SSL Certificate Is Installed?
- If the problem persists or other problems occur, you can buy SSL certificate configuration optimization service in HUAWEI CLOUD marketplace. The optimization service provides you with professional one-to-one consulting service.
Last Article: Installing an SSL Certificate on an Apache Server
Next Article: Installing an SSL Certificate on a WebLogic Server

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