Azure / Azure/static-web-apps

Custom domain stuck in "Deleting" across multiple Static Web Apps — blocks deletion and re-registration

Open
#1,795 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

A custom domain (an apex domain and its `www` subdomain) is stuck in status
"Deleting" simultaneously on several Static Web Apps in the same subscription.
The portal shows: "An unknown error has occurred while adding your custom domain.
Please try again later."

Because SWA custom domains are globally unique, the hostname is now treated as
in-use: it cannot be added/validated on ANY app, and every app still holding it
fails to delete with Code: ResourceDeletionFailed. This is a deadlock only the
product team can clear.

### Region / provider
- Region: East Asia
- Provider: Microsoft.Web/staticSites
- (Subscription ID, exact resource names, and correlation IDs - privately
on request — happy to share via a secure channel.)

### Steps that lead to it
1. Add a custom domain to a Static Web App before the DNS CNAME had fully propagated.
2. Validation fails; try to delete the custom domain to re-add it.
3. The delete hangs indefinitely in "Deleting".
4. Repeating on new apps spreads the same stuck hostname across multiple apps.

### What I've already tried (all fail)
- Portal "Delete" on the custom domain → hangs in "Deleting" for >1 hour.
- `az staticwebapp hostname delete` → "Operation returned an invalid status 'OK'", entry remains.
- `az resource delete --ids <.../customDomains/>` → same result, entry remains.
- `az staticwebapp delete` on the app → ResourceDeletionFailed (blocked by the stuck child domain).
- Confirmed there are NO management locks on the resource group.

### Request
Please force-clear the stuck custom-domain bindings server-side so the hostname is
released, and/or unblock deletion of the affected apps. I can provide the
subscription ID, resource IDs, and correlation IDs privately.

### Environment
- Deploying a Next.js static export via GitHub Actions to Static Web Apps (Free plan).
- CLI: latest az.

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file or test is identified. Start by reviewing the reported Azure Static Web Apps custom-domain deletion behavior and the listed portal and az CLI commands, using the provider, region, and private resource details supplied by the reporter. Done means the stuck bindings are cleared and the hostname and affected apps can be deleted or re-registered.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, github-actions, next.js
Domain
cloud, devops
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.