In this post, I will show you how to add a custom domain with an SSL certificate on your Azure Web App.
As a prerequisite you must have deployed an Azure Web App and the least service plan must be B1.
Let’s get it configured!
From the Web App left-hand side blade, select Settings – Custom domain – + Add custom domain
Do the following configuration as the image below depicts, i.e.:
- Domain provider : All other domain service
- TLS/SSL certificate : Add certificate later
- Domain : Type your custom domain name
In the next step, you need to add the A and TXT records on your domain provider.
A Record
Copy the value (IP address) Type A from the Azure portal and paste it into the DNS service settings Record type A.
In DNS records, the “A” represents the IP address of a given domain, and it is the most basic type of DNS record.
TXT Record
Copy the value Type TXT from the Azure portal and paste it into the DNS service settings Record type TXT.
A TXT record is a type of Domain Name System (DNS) record containing information about your domain in text format.
If you have completed the above steps at your domain provider DNS Service configuration page, a few hours later when you choose to validate the domain, you will see a message like the one below. Select Add to add the domain to the Custom domains.
Add TLS/SSL binding
A TLS/SSL certificate must be bind to your custom domain if it hasn’t. It is possible to accomplish this by creating a new certificate or uploading an existing one. For demo purposes, I have chosen to Create App Service Managed Certificate. The other options that given are:
- Import App Service Certificate
- Upload certificate (.pfx)
- Import from Key Vault
The process to create the certificate might take approximately 5 mins.
Select the newly created certificate and click the Add button to bind it to the custom domain.
After completing all the above steps you will have two domains, one default and one custom and both will point to the same website.
After typing the custom domain ggrammatikos.com address into a browser address bar, you will be directed to your recently created Azure Web App default page.