Now I wanted to add a custom domain name. To do this we need to upgrade the account (yet again! – how free are the first 12 months?!?) First I needed to upgrade the Azure App Service Plan. This is a really good overview of what is an Azure App Service Plan and what does it do, well worth reading.

Navigate to ‘Scale up’ and select any option other than the free one. This will allow adding a custom domain.

At this stage if you use Cloudflare (like I do) to secure your app, you must bypass it now until Azure has verified the domain. I got caught out on this and had to start over with removing the domain and adding it again.

I followed this article to help me set it up: Configure a domain for an Azure App Service using Cloudflare | Software Engineering.

In the ‘Add a custom domain’ section of Azure click add and enter the domain name. If you haven’t already; you’ll need to add some DNS records to verify the domain. Adding the domain will only work once it can find those records.
I needed to add both the domain and another with the www prefix, otherwise when navigating to it wouldn’t show up.

If all has gone well, Cloudflare can now be reenabled. By navigating to the newly added custom domain the site should show up.

Series Navigation<< Deploying to Azure – part 3, Deploying the siteDeploying to Azure – Part 5, Continuous delivery >>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.