Add custom domain to Azure App Service

I got a call last night from our in-house developer, he had created a website, to be used the following morning, and he needed to get a Custom domain name setup.

Here is how to setup a Custom Domain name for your Azure App Service

You need the following

  • App Service Plan spec B1 (minimum)
  • The certificat (in format:)
  • The Password for the certifcat.
  • Access to your companys DNS provider
  • Access to your companys DNS Server

The first step is to create the DNS records at your DNS provider and in your DNS servere. The reason for doing this is that the DNS records needs time to update.
The DNS record that needs to be created is a “CNAME” record.

So, login to your DNS providers website (Below is a screenshot of my DNS provider, your may be different.

Now you need to create the DNS in your company’s DNS Server. This is again a CNAME record.

Now that the DNS records are created we can move on to setup the custom domain name for your Azure App.

As you can see my app is named “vfrohn”, so in the search bar in azure type the name of your app and select it.
When you have located your App Service, navigate to “Custom Domain” in the right side menu.

Select (Custom Domains)

Press “Add Custom domain name”, in the menu to your right you will then need to type the Custom domain name. In my case the name is “azureapp.vfrohn.dk”
Press “validate” – If the the DNS records are updated you will see green lights a cross the board.
Press “Add custom domain”

You have now be returned to the same page your where on before when you press “Add custom domain” But now there is an error telling you there is no valid certificate.
To correct this error, press “Add binding” next to your new custom domain name.
You will now be asked to upload the certificate as .pfx.
Upload the the certificate and the type the password for the certificate.

I can now call my in-house developer and tell him everything is done and he can continue to do his thing, and i can get back to sleep.