An Azure service that provides streamlined full-stack web app development.
Just to provide a final update this question, Microsoft's product team applied a fix that allowed the removal of the custom domain.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I recently attempted to delete a custom domain from an Azure static web app. It has been stuck in the deleting status for several weeks. I've attempted to delete it from the GUI multiple times over the course of the past few weeks.
All DNS records for the custom domain (CNAME, etc) are still active.
I've also attempted to run the following PowerShell command (with the correct names for each variable):
$rg = "[resource group name]";
$name = "[static web app name]";
$remove_me = "[custom domain name]";
$domains = Get-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name;
$len = $domains.Length;
while($len -eq $domains.Length){
foreach($item in $domains){
if($item.name -eq $remove_me){
$err = Remove-AzStaticWebAppCustomDomain -DomainName $remove_me -Name $name -ResourceGroupName $rg -NoWait;
$domains = Get-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name;
if($domains.Length -gt 0){
Write-Host "$remove_me still exists. Retrying...";
Start-Sleep -s 10;
}
}
}
}
Write-Host "Success!";
As well as this by itself:
Remove-AzStaticWebAppCustomDomain -ResourceGroupName [resource group] -Name [static web app] -DomainName [custom domain name]
Neither has worked, with the logs showing:
As well as this in PowerShell:
Remove-AzStaticWebAppCustomDomain_Delete: The server responded with an unrecognized response, Status: OK
Any assistance would be appreciated in resolving this.
An Azure service that provides streamlined full-stack web app development.
Just to provide a final update this question, Microsoft's product team applied a fix that allowed the removal of the custom domain.
WRex, Once again, appreciate your patience and collaboration!
Update 2:
(Following up from the private message)
Our product team have applied a fix, please retry deleting the domain and it should succeed. If it continues to fail, please let us know.
Update 1: We had followed via private message to get resource info for a closer investigation.
I've attempted to delete it from the Azure Resource Manager as well as manually, but it did not work.
The resource group currently has no locks in place.
When using the command you provided (with correct information):
az staticwebapp hostname delete -n "<static-webapp-name>" -g "<resource-group>" --hostname "<custom-domain>"
I get the following output and the custom domain isn't deleted:
Are you sure you want to perform this operation? (y/n): y
After deleting a custom domain, there can be a 15 minute delay for the change to propagate.
(Unspecified)
Code: Unspecified
Message:
The script I ran originally came from the forum post you linked.
I am in the process of removing the DNS entries.