How to Add Custom Domain Name to Azure Web App.
In this post, I will do a brief demonstration on how to add a Custom Domain name to an Azure Web application.
By default, all Azure Web Apps has the extension azurewebsites.net. As an organization, this might not be acceptable or live up to the organizations branding standards but not to worry Microsoft has the option to map existing Azure Web Apps to Custom Domain name i.e. Consult.thatlazyadmin.com.
To get started with adding a Custom Domain, we need to login to the Azure portal and open the existing Azure Web App.
- From the Dashboard select the web application.
- From the Azure web app menu select Custom Domains.
From the Custom Hostnames page, we have two options use and existing domain by simply just clicking on Add hostname or from the same console screen there is an option as well to Buy a Domain.
For the purpose of the demonstration, I will go ahead and click on Add hostname.
On the next page, you will be prompted to add the desired hostname. I will use consult.thatlazyadmin.com and then click on Validate.
Once the Validation process completed, you will be presented with the next steps.
As you can see from the results after the Validation, we need to add a CNAME record and point it to the azure web app.
To create a CNAME record login to your Domain Hosting provider console and add a new CNAME record.
I have created my record as follow.
Now that the new record has been created, we need to validate the hostname again for the Azure web app.
The next and last step would be to add the newly created Custom Domain to the existing Azure web app by clicking on the Add hostname button.
Now that we have created and Validated the new Domain hostname, we can open a new browser and navigate to the newly created Custom Domain name.
And that is how you can quickly and easily add a Custom Domain name to Azure web apps.