MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.27k stars 21.45k forks source link

A record and ip address #52206

Closed orloffm closed 4 years ago

orloffm commented 4 years ago

The confusing part is with adding the A record. Say, I want it to point to my App Service. What if its IP address changes? What is the way to handle that?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

himanshusinha-msft commented 4 years ago

Thanks for the feedback and bringing this to our notice . At this time we are reviewing the feedback and will update the document as appropriate .

TravisCragg-MSFT commented 4 years ago

@orloffm As is stated in the doc, the A record must be manually updated if the underlying IP address for the web app changes. a CNAME is recommended unless you are using a root domain.

Please let me know if you have any additional questions.

orloffm commented 4 years ago

Yes, that's understandable.

Please understand where I'm coming from: I've made an app service, and have followed the previous tutorial to transfer domain management from Namecheap to Azure DNS. Now I move to this tutorial page, and I want to direct the root domain to my app service. The approach is to make the A record point to ip address. But what is the proper way to ensure that this always works even if IP address changes?

This feels as a bottleneck reliability-wise and as something missing from the tutorial.

What are the options at all? Buy a static IP address? Up-scale from B1 to other tier? Maybe there is some project on GitHub that creates an app service that auto-updates this?

I'm only getting into Azure and am not sure what to even look at here, and I think tutorials should cover such things.

Thank you very much.

TravisCragg-MSFT commented 4 years ago

@orloffm it is highly recommended to use a CNAME and not map a root domain to an App Service.

There are situations when an App Service will change IP Addresses, and you can find them Here.

There is also a rare case when Azure will need to change the IP Address of your App Service without one of the above conditions occurring. We will notify you when this happens so that you can make the needed record changes.

rohinkoul commented 4 years ago

its not possible to add a CNAME as zone apex. Hence a A record is used. This is a limitation in DNS standard itself. No change is required in tutorial at the moment.

orloffm commented 4 years ago

@TravisCragg-MSFT

not map a root domain to an App Service

But isn't it a suggested use case for app services? I do dotnet new webapp and host in on an app service and make it available on the Internet under a root domain?

So what is the way to host web apps? Fire up a Linux VM, buy a static IP and point the A record to it?

rohinkoul commented 4 years ago

@TravisCragg-MSFT : Please move this to AppService team. Guidance on this should come from AppService team.

TravisCragg-MSFT commented 4 years ago

@rohinkoul noted, I have been collaborating with the enigmatic web app expert @BryanTrach-MSFT on this one.

@orloffm This article is about the creation of the Azure DNS records. For Web App specific guidance and best practices, your best bet is to create a new issue on this doc about Azure Web Apps and Custom Domains, or ask your question on Microsoft's New forum, Microsoft Q&A under the azure-webapps tag!

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.