TL;DR: Is there any way to delete the default domain for an Azure web app? I want to reuse the domain name with a different app.
I need to take over the administration and start paying the bills for an Azure app that I wrote for a customer. My idea is to create a completely new web app in my own Azure account and then just change the DNS records.
The old app uses the default domain that Azure assigned to it when I created it – let's call it oldapp.azurewebsites.net
. This is the URL that we communicated to all the users and that we use in integrations with other systems.
I created a new web app in my own subscription and setup the CI/CD pipeline and so on to work with the new app. However, when I had everything up and running, I wasn't able to change the domain of the old app. On the "Custom domains" blade for the app in Azure Portal there is no way to select the default domain, and the delete button is grayed out. I tried setting up a second custom domain, but even with that I couldn't delete the default domain.
I even went so far as to delete the old web app late one night, thinking that the domain name would then be free and I could grab it with the new account, but Azure has a 30-day safety period before the app is deleted completely. That's a nice feature, but I can't have a month of downtime just to move the app. I ended up undeleting the app, so now it's back in its old place.
Do you have any advice or thoughts on how I can point the Azure DNS records to the new app? Is this even a feasible plan, or should I try something completely different?