Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows Server 2019 / How to Install an SSL Certificate on IIS (Windows Server)

September 7, 2023 Windows 10Windows Server 2016Windows Server 2019

How to Install an SSL Certificate on IIS (Windows Server)

This guide covers how to issue and install an SSL certificate on an IIS (Internet Information Services) web server running on a Windows Server.

Contents:
  • Create a Certificate Signing Request (CSR) with IIS on Windows
  • How to Install an SSL/TLS certificate in Windows IIS
  • Bind an SSL certificate to an IIS Website

Create a Certificate Signing Request (CSR) with IIS on Windows

To create an SSL/TLS certificate from an external Certificate Authority (CA), you need to generate a Certificate Signing Request (CSR). You can create a CSR from within the IIS GUI:

    1. Open the Internet Information Services Manager console (InetMgr.exe);
    2. Select your Windows host and go to the Server Certificates section; IIS on Windows Server - generate Certificate Signing Request (CSR)
    3. From the Actions menu on the right, select Create Certificate Request;
    4. Fill in the certificate information =:
      1. Common Name – specify the FQDN of the site (webserver) your clients will connect to. For example: reports.woshub.com . If you want to create a wildcard certificate for a domain, please type in *.woshub.com
      2. Organization – specify the name of your organization. For Organization Validation (OV) and Extended Validation (EV) certificates, please enter the official organization name. Individuals may use Domain Validation (DV) SSL certificates. In this case, you must provide the full name of the certificate owner;
      3. Organizational unit – the internal name of the department within your organization that is responsible for the certificate;
      4. City/locality
      5. State/province
      6. Country/region – two-letter country code.

      Configure certificate distinguished name properties

    5. Select a cryptographic service provider and key length. We recommend using the Microsoft RSA SChannel Cryptographic Provider with a key length of at least 2048 bits; CSR - select cryptographic service provider
    6. Specify the name of the file to save the CSR request;
    7. You should get a text file that starts with BEGIN NEW CERTIFICATE REQUEST and ends with END NEW CERTIFICATE REQUEST line. CSR request file

Submit your CSR file to the organization authorized to issue SSL certificates. If you are using an internal Microsoft-based Certificate Authority, please upload the CSR, sign the certificate, and then download the CER file.

Sign a CSR with Certificate Authority

How to Install an SSL/TLS certificate in Windows IIS

Once you have received your SST/TLS certificate file (*.CER) from your CA, you can proceed to install it in IIS.

Open the IIS Manager console, go to the Certificates section, and select Complete Certificate Request.

Complete Certificate Request wizard on IIS

Please note that this article explains how to install DER/base64 encoded X.509 certificates received from Microsoft in *.CER format. If you have received a certificate in *.CRT format from your Certificate Authority, you won’t be able to import it and install it in the IIS.

What you need to do is to convert your CRT certificate to PFX format. The easiest way to do this is to use the openssl tool, which is available in any Linux distribution. You will need a certificate (*.crt) and a private key (*.key) file. To do the conversion, run the command below.

$ openssl pkcs12 -export -out target.pfx -inkey source.key -in source.crt

Once you have a certificate in a PFX format, you can have it imported through the Import menu. If you have a certificate file in PFX format, you can upload it to your Windows cert store via the Import menu.

You can also do a CRT certificate conversion directly from Windows:

  1. Double-click your CRT file;
  2. Go to the Details tab and click Copy to File; Copy certificate to file
  3. Select Base-64 encoded X.509(.CER); Conver certificate to base 64 encoded x.509 (CER format)< /li>
  4. Specify the path to save your CER certificate file.

Select the *.crt file that contains the SSL certificate that you received from the Certification Authority. Specify the friendly name of the SSL Certificate and the certificate store where you want to place the certificate (Personal or Web Hosting). Install certificate on Windows Server

Once that’s done, the new SSL certificate should appear in the list of available certificates in IIS.

Bind an SSL certificate to an IIS Website

Now you need to bind your certificate to the IIS website, port, and/or IP address. Locate your website in the IIS console, and select Edit Bindings.

IIS website - edit bindings

Click Add and fill in the following info:

  • Type: https
  • IP Address: select All Unassigned or a specific IP address to bind the SSL certificate to (you can run multiple websites on the same port and IP address of the IIS web server)
  • Port number: 443
  • Hostname: specify the name of the host the certificate was issued for
  • SSL Certificate: find and select the SSL certificate that you installed from the list

iis install ssl certificate

At this point, you can also enable HTTP/3 and QUIC support for the IIS website.

Now restart the IIS website ( select Manage Website -> Restart or use the iisreset command).

Restart ISS

Try opening your IIS website in a browser using the https:// prefix. If the certificate is installed correctly, a green padlock will appear in the address bar of your browser. This means the connection is secure. Click the padlock icon to view information about the SSL certificate.

Check for secure HTTPS connection to IIS

Next, configure IIS rules to redirect all HTTP requests to the site to HTTPS URL addresses.

For an IIS site on Windows Server, you can use free Let’s Encrypt SSL certificates.

0 comment
0
Facebook Twitter Google + Pinterest
previous post
Managing Windows Firewall Rules with PowerShell
next post
Add an Additional Domain Controller to an Existing AD Domain

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Allow Multiple RDP Sessions on Windows 10 and 11
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows
  • Fixing ‘The Network Path Was Not Found’ 0x80070035 Error Code on Windows
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top