DEV Community

Cover image for How to Configure IIS to Use HTTP/2
Eden Allen
Eden Allen

Posted on

How to Configure IIS to Use HTTP/2

Enabling HTTP/2 on IIS (Internet Information Services) is a straightforward process that involves a series of steps to install, configure, and secure your web server.

By following these six steps, you can ensure that your server is ready to take advantage of the enhanced performance and efficiency provided by the HTTP/2 protocol.

1. Install Internet Information Services

Getting it on Windows 10, click on the Start button, go to the Control Panel and choose Programs and Features; click "Turn Windows Features On or Off."

In the list, tick the requirements which include selecting Internet Information Services to enable IIS.

Now, if you are working with Windows Server 2016, it's easier for you to find this option in 'Server Manager' >> Add Roles and Features >> Web Server (IIS) in the list of Roles.

The need of performing this step is to make sure that the IIS role is available on the server through which you can manage and configure applications on the Web.

2. Open Internet Services Manager and Install SSL Certificate

Type ''IIS Manager'' in the start, and you will be directed to the program after it has been installed. Under the Connections tab in the left pane select your server name.

Next, locate and click on "Server Certificates" within the middle pane, after that go to the "Actions" pane on the right hand side and click on "Complete Certificate Request".

This step is necessary since most of the time in order to establish HTTP/2 you need to use HTTPS and to do that, you need to install an SSL certificate.

Note: A very important step that needs to be followed is that the SSL certificate must be installed on the same server that the CSR was created on.

During the generation of CSR the private key is created on the server and it seems to work only when matched with the SSL certificate.

3. Install the SSL Certificate

In the "Complete Certificate Request" wizard, browse to the location of your SSL certificate file, typically a .cer file.

After selecting the file, provide a "Friendly Name" for the certificate. This name is used to identify the certificate within IIS Manager and does not impact the certificate's functionality.

Click "OK" to install the SSL certificate on your server. This step completes the process of making the SSL certificate available for use on your web applications.

4. Assign the SSL Certificate

After the SSL certificate has been installed, go back to the current IIS Manager window. Under "Connections" find the SSL certificate was installed on the server. Go down up to the "Sites" node and select the site from which you want to enable HTTP/2.

In the right side section known as the "Actions" pane, click on the "Bindings" option This action opens the "Site Bindings" page which deals with the manner in which your site interacts over the network.

5. Add HTTPS Binding

Under "Site Bindings," follow the steps below:

  • In the "Add" or "Edit" field of the "Type" dropdown list, change the drop down from "HTTP" to "HTTPS" From the "IP address" the selection should be "All Unassigned" this makes the server reply to requests on any IP address on the server.
  • It is recommended to set the port to 443 so as to focus solely on the HTTPS traffic which would be the default one for this server.
  • In the "SSL certificate" dropdown, choose the friendly name of the SSL certificate that you added earlier on the process. This step will make your site use an https connection which is required for the HTTP/2.

6. Complete the Setup

After all the binding details have been properly configured, the OK button can be clicked in order to make the changes.

With that, the IIS Manager will change the site to enable the selected SSL certificate for https requests. With these settings configured, your site is ready to make best use of HTTP/2 that will help in getting faster and more efficient communication with the clients.

Source

Top comments (0)