Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install ssl certificate received from SSLForFree.com on IIS

I received an SSL certificate from sslforfree.com. It is a .zip file consisting of 3 files:

  1. certificate.crt
  2. private.key
  3. ca_bundle.crt

How should I install this certificate on IIS 8.0? (What am I supposed to do with these 3 files?)

like image 780
Omid Sadeghi Avatar asked Jan 03 '23 13:01

Omid Sadeghi


1 Answers

First, you need to make a .pfx file to make things easy. You need to Install openssl and run the following in a command prompt with path set to location of downloaded certificate files

openssl pkcs12 -export -out "certificate_combined.pfx" -inkey "private.key" -in "certificate.crt" -certfile ca_bundle.crt

Second, import the certificate to IIS:

enter image description here

enter image description here Note: You created the password when you created .pfx file with openssl in command prompt.

Third, bind https to the website and choose the imported certificate in "Add Site Binding" window:

enter image description here Note: You need to do this once for every domain name. For example if you have "www.abc.com" and also "abc.com" as your domain names you must do the https binding two times and each time write the corresponding domain name in "Add Site Binding" window and make sure that "Require Server Name Indication" is checked. Also you need to add another extra https binding without checking "Require Server Name Indication" and without writing any Host name to remove the "No default SSL site has been created" warning in IIS.

Congragulations. You are done. Now your website can be accessed with securely with https without any warning or error.

like image 77
Omid Sadeghi Avatar answered Jan 29 '23 21:01

Omid Sadeghi