By using this website, you agree to the use of cookies as described in our Privacy Policy.
3 minutes reading time (568 words)

Configure SSL for an Azure Web App using Let's Encrypt

padlock

Generate a free SSL Certificate for your Azure Web App using Let's Encrypt to secure your website with HTTPS. 

Find Azure resource details for Let's Encrypt

In this guide we will create an Azure App registration for Let's Encrypt and generate an SSL certificate for our website. 

To create the Let's Encrypt certificate, we will need to collect the following info:

Azure Tenant ID
Azure Subscription ID
Application (client) ID
Application Client secret
Resource group name
Storage account connection string

Azure Active Directory - Properties
Copy the Tenant ID

Subscription
Copy the subscription ID

Storage account
Access Keys - show keys

Copy the Connection string

Create App registration for Let's Encrypt

App registrations - New registration

Name: Let's Encrypt - Planet Express
Redirect URI: https://www.planetexpress.live
Click Register

Copy the Application (client) ID

Create client secret

Certificates & secrets - New client secret
Description: Let's Encrypt - Planet Express Login
Click Add

Copy the client secret value

Add permissions for Let's Encrypt

Resource groups 
Access control (IAM) - Add - Add role assignment

Role: Contributor
Assign access to: select Let's Encrypt - Planet Express
Save

Add Azure Let's Encrypt App Extension

App Service - Extensions - Add

Choose Extension

Azure Let's Encrypt

Accept legal terms

Click OK

Add Azure Let's Encrypt extension - Click OK

Generate Let's Encrypt SSL Certificate

App service - Extensions - Azure Let's Encrypt

Click Browse

Enter the following details:

Azure Tenant ID
Azure Subscription ID
Application (client) ID
Application Client secret
Resource group name

Storage account connection string
Tick update Application Settings and Virtual Directory

Click Next

Custom domains and SSL - Next

Use the [Ctrl] key to select both hostnames. The certificate will need names for the www and non-www versions of your website.

Enter email address then click Request and Install Certificate

Set Web app to HTTPS only

App Service - TLS/SSL settings
HTTPS Only - On

Browse to the site to check the new SSL certificate

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Guest
Wednesday, 01 December 2021

By accepting you will be accessing a service provided by a third-party external to https://techlabs.blog/