How to rename the Azure WebApp URL

AzureCloudAzure Web-App-Service

Azure Problem Overview


For numerous time it has happened that our DevOps guys have created a Azure WebApp with incorrect URL.

Which forced us the delete the resource group (as group contains web app, sql azure etc.) And re-create.

Is there a way to re-name /update the Web App URL via powershell Azure API or some hidden azure portal feature?

Azure Solutions


Solution 1 - Azure

It's not possible to rename web apps.

And you don't need to delete the whole resource group. Just delete the one web app and recreate it with the correct name.

Solution 2 - Azure

You can clone the web app , and in the process give the new url. Remove the earlier web app and you are good to go

Solution 3 - Azure

You can just add the hostname to the resource hosting the web application.

For example from portal.azure.com go to "App Services", choose your service and from the blade search for "domain", then click "Custom domains", then add "hostname" that will ask your DNS, validate and give you the DNS records you need to add, see screenshot below:

Custom domains in Azure

NOTE: this does not actually rename the resource, the old one will still be a valid alias for the the resource along with the domain name registered in this note.

Solution 4 - Azure

No :(

Best option is to redeploy. Maybe add a confirmation message of your name? "Are you sure you want to call this resource 'Foobar'"?

Solution 5 - Azure

There is no way to rename your webapp url since it create unique dns and maps. If you still want to do that then use automation script to delete existing and redeploy your code to newly create one. Ex. Clone existing => update new url => create new webapp=> delete existing one

Solution 6 - Azure

I came here for the same reason for my dev site and just gave up and cloned it since it was dev\qc anyway. Took about 5-7 minutes to clone and BOOM, no changes needed and actually was able to update the region to a better one\closer to have a better compare to my prod.

Under Azure App Home page for your app., scroll down on left to "Developer tools" - Select Clone app. Add a new URL and update area etc.

You can then go and add your custom domain after, etc.

Simple as that..

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNil PunView Question on Stackoverflow
Solution 1 - AzureZain RizviView Answer on Stackoverflow
Solution 2 - AzureSabyasachi SamaddarView Answer on Stackoverflow
Solution 3 - AzureFernando Gonzalez SanchezView Answer on Stackoverflow
Solution 4 - AzureChris Anderson-AWSView Answer on Stackoverflow
Solution 5 - AzureRahul ShuklaView Answer on Stackoverflow
Solution 6 - AzureRick BView Answer on Stackoverflow