I need to have the same Azure App Service Custom Domain running in different App Services on the same region. Is that possible?
I need to have the same Azure App Service Custom Domain running in different App Services on the same region. Is that possible?
I too would find it useful to be able to bind the same custom domain name across multiple app services within a single app service plan. The use case for this is performing infrastructure migrations with no downtime and the ability to fully test out all the functionality of the app service. The ability to bind the custom domain to multiple app services within the same resource group / App Service plan is essential for this. The workflow im trying to support is like this:
Create new app service with a different configuration to the existing live app service
Deploy an application to the app service and test that it works
Cutover the DNS records to point to the new app service instead of the old app service
Currently I dont think this is possible without me using another app service plan. I think this is quite restrictive as I dont want to spin up another production grade app service plan just to facilitate this migration. I feel like this is a valid scenario and I don't currently see an alternative to this without introducing extra steps / costs.
What you're describing is what deployment slots are for. Your app service plan would need to be on a premium plan for slot support. Each slot is a fully autonomous app service with it's own configuration and settings including custom domain.
You would deploy to the staging slot, verify changes, and then swap it with the production slot without the need to change DNS.
Custom domians are based in DNS, only one record should be pointing to one App Service, so I think it would not be recommended to have same custom domain in multiple App Services in the same region. Being said that, it works for different regions and it is common to see this deployments for instance behind Traffic Manager or Azure Frontdoor.
In order to do this in the same region is a bit more challenging as the only way is to make sure your App Service goes to a different webspace (https://docs.microsoft.com/en-us/azure/app-service/app-service-plan-manage#move-an-app-to-another-app-service-plan). So basically to make sure it goes to a different webspace you need to create a new Resource Group and a new App service Plan, then you can create the specific App Service and add the custom domain. In order to make sure they are in different webspaces, check if the Inbound IP is different.
Thank you
Thank you to IgnacioAlvarezArenas for the assistance.
10 people are following this question.