azurednsazure-web-app-serviceazure-webapps

Azure Web App with custom domain "A" DNS not working


I have a website hosted on an Azure Web App with a custom domain. I can't get the domain to work without the 'www'. So anyone trying to access https://domain.me/ cannot do so.

I've googled and found that to achieve this, you need to configure an 'A' type DNS record pointing to the IP that resolves the domain. I looked up that IP using nslookup and see that it matches the one Azure shows in the web app's network configuration: 20.50.2.36

Azure Web App Network configuration

So that's how I've configured it:

DNS configuration

I've waited for the DNS to refresh, but when I test it, the URL leads me to a generic Azure page.

Error in site

I've been looking for information and can't find a solution. Any help with this issue?


Solution

  • You also need to add the custom domain to the App Service: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain?tabs=root%2Cazurecli.

    App Service needs to know which domain to map to which app, so it needs to be registered there.