DEV Community

Sardar Mudassar Ali Khan
Sardar Mudassar Ali Khan

Posted on

How to Deploy the site using Https On IIS Server

To use HTTPS (Hypertext Transfer Protocol Secure) in IIS (Internet Information Services) server for website deployment, you'll need to follow these steps:

Obtain an SSL/TLS Certificate: First, you need to obtain an SSL certificate from a trusted certificate authority (CA). You can purchase a certificate from a commercial CA or use a free certificate from Let's Encrypt.

Install the SSL Certificate: Once you have the SSL certificate, you need to install it on your IIS server. Here's how you can do it:
a. Open the IIS Manager on your server.
b. Select your website from the "Connections" pane.
c. In the "Actions" pane, click on "Bindings."
d. Click on "Add" to create a new binding.
e. In the "Add Site Binding" window, configure the following:

Type: Select "HTTP" from the drop-down menu.
IP address: Choose the appropriate IP address for your website.
Port: By default, the port will be set to 443 for HTTPS.
SSL certificate: Select the SSL certificate you installed.
Configure HTTPS Redirect (optional): If you want to redirect all HTTP traffic to HTTPS, you can set up an HTTP-to-HTTPS redirect. This ensures that all requests to your website are automatically redirected to the secure HTTPS version. Here's how you can configure the redirect:
a. In the IIS Manager, select your website.
b. In the "Actions" pane, click on "HTTP Redirect."
c. Enable the option "Redirect requests to this destination."
d. Enter the HTTPS URL of your website in the "Redirect to" field.
e. Select the checkbox for "Only redirect requests to content in this directory (not subdirectories)."
f. Click on "Apply" to save the changes.

Test and Verify: Once you have configured HTTPS in IIS, you should test and verify that it is working correctly. Open a web browser and enter your website's URL with "https://" at the beginning. If everything is set up correctly, you should see the padlock icon indicating a secure connection.

By following these steps, you can enable HTTPS on your IIS server for website deployment, ensuring secure communication between clients and your web server.

Top comments (0)