I started seeing a new issue on June 10th, 2025 that my Azure App Service staging slot was created with the name “staging”, but it became “stagingd5a1” in the domain name.
So four seemingly random characters were added to my azure app service deployment slot name. This became a problem as my pipeline is running health checks on the deployment. These checks, however, are not run on the assigned name but on the expected name which suddenly was no longer correct. It would be possible to obtain the name and use it, but there are also other issues that can emerge from it. The website might not know what portal to return on a random hostname, CORS errors could occur on an unexpected domain.
Microsoft is generally pushing for more secure, randomly generated hostnames.
However, this is not the feature I ran into in this case.
This is the code I used to create the slot, and time after time the slot was created with additional characters in the domain name.
az account set --subscription webperformance-sub-dev
az webapp deployment slot create --name webperformance-app-dev --resource-group webperformance-rgr-dev --slot staging --configuration-source webperformance-app-dev
One corrective action that made the issue disappear was using any name other than “staging”. This was another clue about the underlying problems. It means the name “staging” as a slot name was burned, but no others were.
For me, it was clear at this point that there was an issue in Azure and that it wasn’t related to the newly introduced ‘Unique Default Hostname’ feature.
Raising a support ticket finally clarified my Azure App Service issues (in my case on a Windows instance, not Linux, but I don’t know if that matters). The problem was there was an orphaned slot I wasn’t able to see. So a slot with the name “staging” prevented another slot with the same name from being created. However, this slot was not visible to me, only to Azure support. This means the slot was deleted previously but not fully and is now blocking further use of the name.
The Microsoft App Service team was able to confirm this and, within a few hours of reporting it, managed to delete the orphaned slot, fixing my issues.