Monday, 5 September 2016

Buying an SSL certificate for a single custom sub-domain in Azure

The process of buying an SSL certificate in Azure is relatively simple and well-documented via the App Service Certificates option in Azure.

However, I recently had to buy an SSL certificate for a specific custom sub-domain and found the process and advice to be somewhat confusing prior to committing to the purchase. This article states:
Make sure to enter correct host name (custom domain) that you want to protect with this certificate. DO NOT append the Host name with WWW. For example, if your custom domain name is www.contoso.com then just enter contoso.com in the Host Name field, the certificate in question will protect both www and root domains.
This information is specifically aimed at those who are creating a website certificate for the www sub-domain. In terms of a custom sub-domain you shouldn't follow the same advice.

Therefore, this post will help you if you're in a similar situation as follows:

  • You've deployed an Azure App Service Web App to Azure, e.g. mywebapp.azurewebsites.net
  • You own a custom domain, e.g. necloud.uk
  • You've associated a sub-domain such as mywebapp.necloud.uk to mywebapp.azurewebsites.net
Then purchase the SSL Certificate as follows:
  • Log into Azure->App Service Certificates->Add
  • Here's the catch... under the "Naked Domain Host Name" field, enter the full sub-domain, e.g. mywebapp.necloud.uk, i,.e. DO NOT enter just necloud.uk unless you specifically want a wild card certificate.
  • Once purchased, you can add the certificate to your sub-domain via Azure->App Service->mywebapp->SSL certificates->Import App Service Certificates

No comments:

Post a Comment