We can use either a CNAME record or an A record to map a custom DNS name to our App Service.
Because I’m setting up my root domain (jasonhand.com) I will use an A record.
To map an A record, you need the app’s external IP address. You can find this IP address in the app’s Custom domains page in the Azure portal. Copy the app’s IP address for use later.
In the left navigation of the app page in the Azure portal, select Custom domains.
In the Custom domains page, copy the app’s IP address.
I’m managing my DNS with Cloudflare to provide an extra layer of protection as well as faster displaying of content.
If you have a previous A record for your root domain (e.g. jasonhand.com NOT www.jasonhand.com) you’ll want to remove that.
Create a new A Record using the public IP address previously copied from the dashboard.
We also need to create a TXT record to associate the internal (e.g. jasonhandcom.azurewebsites.net)
When you click the “Configure” box in the middle and click the Add button.
Back in the app’s Custom domains page in the Azure portal, add the fully qualified custom DNS name (e.g. jasonhand.com) to the list.
Select the + icon next, add the hostname in the upper right and select “Validate”
Finally, press the “Validate” button at the bottom of the screen.
Huzzah! Within a few moments, your domain should begin resolving to your site hosted on Azure.