How to install SSL Certificates in a Windows Server

Introduction

SSL Certificates secure the web today using Transport Layer Security (TLS). This is a network protocol which encrypts the data between the web server and the visitor. Most websites today are using SSL, and you can see this every time a website starts with https:// instead of http://. This indicates the website is securely encrypting data between you and the server so that no attackers can easily sniff the network packets and capture your logins.

SSL protects the web today and is utilized by almost every corporation and business and acts first step in user security. SSL is a way to protect logins and forms that you enter from being intercepted unknowingly by a 3rd party on your network.  If your website does not incorporate SSL, we suggest implementing it as soon as possible.

In this article, we will show you how to install SSL Certificates in a Windows Server 2019 & 2012

Prerequisites

  • an active Windows VPS
  • IIS

Generating the Certificate Request (CSR)

1. To begin, the first thing you need to do is open IIS. You can search your computer for inetmgr.exe and open it.

2. Click on your server name:

3. Then double-click “Server Certificates

4. On the right-hand side, select ‘Create Certificate Request

5. At this point, you will be asked for information about the certificate and the company requesting the certificate.

Once you have filled this out, click Next.

It will bring you to the following screen:

6. Make sure the Bit Length is set to 2048 or higher. We like to go with 4096 and click Next.

On the subsequent screen, you need to specify a filename where your Certificate Request or CSR can be exported.

For example: we would like to export the CSR to C:\example.com.csr.txt

Ordering the SSL

At this point, you are ready to order your SSL certificate!

1. Go ahead and go to your chosen SSL provider, whether it be GlobalSign, DigiCert, SSL or any numerous other certificate authorities.

2.  When you are signing up for the SSL, it will ask you for the CSR data we saved at C:\example.com.csr.txt – Copy and paste the contents into the certificate authorities website, and it will generate all the same fields we entered via the previous steps.

3. Finish your order, and they will provide you with a .crt certificate file. Download this file and copy it to your web server. For simplicity, copy it to C:\example.com.cer

Great! Now you have created a certificate request and completed it with the certificate authority and have your new SSL certificate ready to be installed.

Installing the Certificate in IIS

1. Open up IIS/inetmgr.exe and navigate to the server as we did in the beginning.

2. Navigate to Server Certificates.Then click on ‘Complete Certificate Request

3. It will prompt you for the location of the new certificate, which we saved at C:\example.com.cer and to make things easier on ourselves later, we will name the friendly name example.com-01 so that we know this is the first SSL for this domain in case we want to renew it later.

Once you hit OK, you should see your certificate in the list of server certificates in IIS.

Great! Now you have generated the certificate request, completed it, and installed your certificate on your web server. Now you need to bind the certificate to your website.

Binding the SSL Certificate to a Website

1. In IIS, browse to Sites > example.com (where you want the SSL certificate installed).

2. Right-click on your site and select ‘Edit Bindings‘ or if you click on the site, you will see Bindings on the right-hand side.

This will open a window that looks like the following:

3. If you already have the https binding setup for your site, you will simply double-click on the https bindings and select the desired SSL certificate from the drop-down. If you haven’t created a https entry in your bindings, click Add. On the right-hand side and you will see the following window:

4. First, set the Type to https so your website knows the request is for a secured URL.

You will want to set the IP Address on your host. In my case, All Unassigned.
Port should be automatically set to 443, if not, do so. (This is the port defined for secured communications.)

5. Set the Host Name to example.com (your domain). In most cases, you will want to check Require Server Name Indication. In our case, we do not need it because this is the only certificate on this IP address. Select your SSL certificate from the drop-down!

Select OK and do it all again, this time instead of setting the hostname to example.com, you will want to set it to www.example.com. This is because we only set it up for requests from https://example.com, but https://www.example won’t register as secured until we add the second binding entry.

That’s all! Enjoy GreenCloudVPS services!

On this page