An Azure service that provides streamlined full-stack web app development.
Hello @Théo Mouchabac
Welcome to the Microsoft Q&A and thank you for reaching out.
I understand that you’re on the Free tier in West Europe. You attempted to add a custom domain using CNAME delegation (DNS is correctly set up and propagated), but the creation failed with an “unknown error.” The domain has now been stuck in a “Deleting” state for over 24 hours. Attempts to remove it via az staticwebapp hostname delete, az resource delete, the Azure Portal, and even deleting the parent Static Web App all fail or time out. This wedged resource is blocking further operations on the parent app, even though the default hostname works fine.
This is a backend synchronization issue with Static Web Apps custom domains.
Recommended Steps:
- Fully clean your DNS records — Remove all CNAME, A/ALIAS, TXT, and any other records associated with the domain. Wait 30–60 minutes for global propagation, then retry the delete.
- CLI retry:
az staticwebapp hostname delete \ --name <YOUR_SWA_NAME> \ --resource-group <YOUR_RG> \ --hostname <yourdomain.com> \ --yes - PowerShell retry loop ( run in Cloud Shell):
$rg = "<your-resource-group>" $name = "<your-static-web-app-name>" $domain = "<your-custom-domain.com>" $domains = Get-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name while ($domains.Name -contains $domain) { Remove-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name -DomainName $domain -NoWait -Force Write-Host "Delete attempted for $domain..." Start-Sleep -Seconds 10 $domains = Get-AzStaticWebAppCustomDomain -ResourceGroupName $rg -Name $name } Write-Host "Done!"
Please let us know if this helps or need more assistance.
Thanks