Securing Data Transmissions with HTTPS in ASP.NET: A Plesk Panel Guide Print

  • 0

Introduction

HTTPS has become the standard for secure communication over the internet. In this guide, you'll learn how to enforce HTTPS in your ASP.NET application hosted in a shared environment on Windows Server 2019 with Plesk.

Prerequisites

  • Windows Server 2019 with Plesk installed
  • An existing ASP.NET application hosted on the server
  • Access to Plesk Panel with administrator or developer privileges

Step-by-Step Guide

Step 1: Acquire an SSL Certificate
  1. Plesk Panel: Log in to Plesk Panel and navigate to the domain where your ASP.NET application resides.
  2. SSL/TLS Certificates: Go to this section to purchase or upload an SSL certificate.
Step 2: Install the SSL Certificate
  1. Upload Certificate: If you've acquired the certificate from an external source, upload it here.
  2. Let's Encrypt: Alternatively, you can also use Plesk's integrated Let's Encrypt feature to obtain a free SSL certificate.
Step 3: Configure SSL in Plesk
  1. Hosting Settings: Navigate to this section and select the installed SSL certificate from the dropdown.
  2. Permanent SEO-safe 301 redirect from HTTP to HTTPS: Enable this option to ensure all HTTP traffic is redirected to HTTPS.
Step 4: Update Application Settings
  1. Web.config: Open your ASP.NET application’s web.config file.
  2. URL Rewrite Rules: Add rules to enforce HTTPS. Sample code snippet below:

<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>

Conclusion

Securing your ASP.NET application's data transmissions with HTTPS is crucial in today's digital landscape. With this guide, you should have a good starting point to secure your application using Plesk Panel on Windows Server 2019.

Additional Support

For further assistance or advanced scenarios, please refer to our knowledge base at www.domainindia.com/knowledgebase or submit a ticket at www.domainindia.com/support.


Was this answer helpful?

« Back