Introduction
In this post, we will see how to create an App Service Domain in Azure and we will get a free SSL certificate from "Let’s Encrypt" Authority. We will also create a Web App in Azure and link it with this domain. Later, we will create a Blazor app from Visual Studio 2017 and will publish to Azure Web App. We will see our Blazor app run with custom domain and SSL certificate.
Create App Service Domain in Azure
Log into Azure.
It will list all the available domains. We must choose at least one domain to proceed further.
Give valid contact details and click the “OK” button.


After accepting the legal terms, we can click the “Create” button to create the domain. It will take some moments to create a new domain.


Free SSL Certificate Creation
We have successfully created the domain. We can now create an SSL certificate for this domain.
We are going to create the certificate from Let’s Encrypt Authority. As I mentioned earlier this is a non-profit organization supported by many famous companies.
Please enter your website name and click “Create Free SSL Certificate” button

We have successfully added two record sets to DNS zone. We can verify the domain now.
Go to the sslforfree.com site and click below links one by one.
You can repeat the same step for the second record also.
Now we can download the certificate by clicking the “Download SSL Certificate” button. You will get a certificate as three parts.
- Certificate
- Private Key
- CA Bundle


Please note that this is CRT files. Azure requires PFX files to create private SSL certificate.
We can use SSL Converter tool to make a PFX file. You can upload a certificate, private key, and bundle file and click “CONVERT” button to create a PFX file.
After a successful conversion, one PFX file will be generated and we can download this file. Please note that this is again a Zip file and we can extract PFX file from this Zip file. We will upload this certificate file to Azure later.
Create a Web App in Azure. We have successfully created SSL certificate for our Domain. Now, we can create a Web App and link with this domain.
We need to give a valid name to Web App and choose resource group.
Please choose Pricing tier as “S1 Standard”. If you choose a basic plan, you can’t link with custom domains.
After choosing the Service plan, you can click the “Create” button to proceed further. Our App will be ready in some moments. You can open App Service and choose “Custom domains” to add the custom domain name in this Web App.


Before adding binding to our hostnames, we must upload SSL certificate (we previously obtained from CA) to Azure.


We have successfully added binding for both hosts.
We can check the Web App now. Our application is working fine. Please note this is the default page only. We have not yet published any web applications to this Web App.
Create Blazor app and deploy to Azure Web App
We can create a Blazor app from Visual Studio 2017 and deploy to this Web App.
In this post, we have created an App Service Domain in Azure and we have created an SSL certificate for this domain in SSL For Free site. We have obtained this certificate from Let's Encrypt Authority. Also, we added two TXT records to the DNS zone of a domain and verified with the certification authority. We have downloaded and converted certificate to PFX format. After that, we have created a Web App and added hostnames to this Web App. We have uploaded SSL certificate and bind with hostnames. Finally, we have created a sample Blazor application in visual studio 2017 and deployed to Azure Web App.

Igor LakticPosted Oct 28, 2020, 3:41 PM
Tnx for article, what hosting model is in your example? Static ASP.NET Core Blazor WebAssembly or dynamic ASP.NET Core Blazor server. Can we host both version of Blazor or only static on Azure App service?
Onkar SharmaPosted May 3, 2020, 1:56 AM
An informative article on trending technology that gives the right path, I will definitely try it...
Kehinde OwensPosted Dec 26, 2018, 11:16 AM
Great article! Anyway to automate the renewal of the certificate?
Prabu ElavarasanPosted Nov 17, 2018, 9:59 AM
Bookmarked your article :-)
Prabu ElavarasanPosted Nov 17, 2018, 9:59 AM
Great explanations.. Thanks much sir..
Abhishek MishraPosted Nov 16, 2018, 10:11 PM
Nice one :) I was looking for something like this. I have a demo to customer where I need a certificate for a website hosted on Azure VM. Can I pick this free certificate and use with IIS hosted web on VM. Will the certificate allow.
Ankur MistryPosted Nov 16, 2018, 12:50 AM
Awesome, thanks for sharing, will definitely try this.