How to Setup SSL for .net website on localhost in IIS

Sometime during the development of .net application on the local machine, you need to run a site using https. To run a website using https protocol an SSL certificate needs to be configured. This article will list all the steps of setting up an SSL certificate for an website hosted on local computer IIS server.

Step 1: Open IIS (Internet Information Services) by typing command “inetmgr” in the command prompt as shown in below snapshot:

inetmgr command

Step 2:  Right click on Sites node and then select the option Add Website as shown in below screenshot:

Add website IIS

Step 3: In Add, Website window enter Site Name and then browse the location on the local machine where a website is present under Physical Path. In Binding section Select Type as https as shown in below screenshot. The default port for website running using https protocol is 443.

Add Website option in IIS

Step 4: In SSL certificate select IIS Express Development Certificate which is default certificate provided for running site using https in IIS as shown below. Click on Ok button.

localhost SSL certifiacte

Step 5: Now Right click on the newly added website then select option Manage Website-> Browse as shown in below screenshot:

How to Open website from IIS

So using the steps as mentioned above SSL certificate can be configured for a .net website hosted on IIS.

SSL certificate for .net website

Leave a Reply

Your email address will not be published. Required fields are marked *