Installing an SSL certificate on a Microsoft IIS

Installing a certificate on a Microsoft IIS web server requires certificate files and its key.

For example, consider installing a Sectigo SSL certificate.

We have 4 certificate files and the certificate key itself:

  1. domain_name.key - The private key of the certificate, which is generated by creating a Certificate Signing Request (CSR)
  2. domain_name.crt - SSL domain certificate
  3. AAACertificateServices.crt - root certificate
  4. SectigoRSADomainValidationSecureServerCA.crt - intermediate certificate
  5. USERTrustRSAAAACA.crt - intermediate certificate

Combine the root and intermediate certificates:

cat AAACertificateServices.crt SectigoRSADomainValidationSecureServerCA.crt USERTrustRSAAAACA.crt > CACert.crt

Convert:

openssl pkcs12 -export -out domain_name.pfx -inkey domain_name.key -in domain_name.crt -certfile CACert.crt

If you get an error like:

unable to load private key

then check the domain_name.key file to make sure it contains entries:

-----BEGIN RSA PRIVATE KEY-----

-----END RSA PRIVATE KEY-----

During the conversion, specify the password for the certificate, you will need it during the installation of the certificate in Windows.

Now the file domain_name.pfx, can be loaded into Windows. To do this perform:

  1. Press "Start" and select "Run".
  2. At "Run" enter "MMC" and press "OK". MMC will open.
  3. Click on the File window and select "Add / Remove Snap-In".
  4. Find "Certificates" and press "Add".
  5. Select "Computer Account" and press "Next".
  6. Select "Local Computer" and press "Finish".
  7. Click "OK" to close the "Add / Remove Snap-In" window.
  8. Double click on "Certificates (Local Computer)" in the center of the window.
  9. Right click on the "Personal" folder.
  10. Select "All tasks" and click on "Import".
  11. Follow "Certificate Import Wizard" to import the "Primary Certificate" from .PFX file.
  12. Select the .PFX and enter the password we had set during the converted certificate.
  13. When prompted, select "Automatically select the certificate store based on the type of certificate".
  14. Click "Finish" to close the Certificate Import Wizard.

Next, you need to bind the certificate to the domain itself:

Open IIS and select the desired site and select "Bindings":

Click Add.

In the Type field, select https, in the SSL certificate field, the certificate you added earlier.

Press OK, then 443 port should be added

How useful was this article?

VAT

  • Other

    Other

    0%
  • austria

    Austria

    20%
  • Belgium

    Belgium

    21%
  • Bulgaria

    Bulgaria

    20%
  • Croatia

    Croatia

    25%
  • Cyprus

    Cyprus

    19%
  • Czech Republic

    Czech Republic

    21%
  • Denmark

    Denmark

    25%
  • Estonia

    Estonia

    22%
  • France

    France

    20%
  • Finland

    Finland

    24%
  • Germany

    Germany

    19%
  • Greece

    Greece

    24%
  • Hungary

    Hungary

    27%
  • Ireland

    Ireland

    23%
  • Italy

    Italy

    22%
  • Latvia

    Latvia

    21%
  • Lithuania

    Lithuania

    21%
  • Luxembourg

    Luxembourg

    17%
  • Malta

    Malta

    18%
  • Netherlands

    Netherlands

    21%
  • Poland

    Poland

    23%
  • Portugal

    Portugal

    23%
  • Romania

    Romania

    19%
  • Slovakia

    Slovakia

    20%
  • Slovenia

    Slovenia

    %
  • Spain

    Spain

    21%
  • Sweden

    Sweden

    25%
  • USA

    USA

    0%
european
states
  • Other
  • canada
  • poland
  • european-union
  • france
  • germany
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria