Azure / Azure/static-web-apps

Custom domain stuck in "Deleting" state for 7+ hours — every delete attempt Accepted (202) then Fails; cannot re-add

Open
#1,798 4 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**
Adding custom domain `www.canterrastays.com` to Static Web App `swa-canterra-prod`
(resource group `rg-canterra-prod`, region: Canada East) failed at 2026-08-13T02:23 UTC
with "An unknown error has occurred while adding your custom domain." The Validate step
SUCCEEDED (HTTP 200) — the Create step itself failed ~10 minutes later.

The domain record is now stuck in `Deleting` for 7+ hours. Every delete attempt —
Azure CLI, direct ARM REST DELETE (api-version 2023-12-01), and the Azure portal —
is Accepted (202), runs for ~6–10 minutes, then transitions to Failed with no substatus.
The portal permanently shows the record as "Deleting."

DNS is verified correct: CNAME for www.canterrastays.com resolves to
`brave-sand-01c38990f.7.azurestaticapps.net` via 8.8.8.8.

**Activity log timeline (UTC, 2026-08-13):**
- 02:23:50 Validate Custom Domain — Succeeded (200)
- 02:23:52 Create Custom Domain — Accepted (202)
- 02:33:55 Create Custom Domain — Failed
- 02:39:08 Delete — Accepted (202) → 02:49:16 Failed
- 03:06:41 Delete (ARM REST) — Accepted (202) → 03:16:43 Failed
- 03:10:10 Delete — Accepted (202) → 03:16:44 Failed

**Correlation IDs from failed operations:**
- Create Failed: 1d37b8f4-d898-4228-a2bb-4223bea8207e
- Delete Failed: 25cbedf0-0c69-43af-bd31-057c709ca26e
- Delete Failed: f459b097-a458-41aa-a7fc-69040d5b0c72
- Delete Failed: c9908161-4c09-4c03-8a75-e9b3557484cb

**To Reproduce**
1. `az staticwebapp hostname set -n swa-canterra-prod -g rg-canterra-prod --hostname www.canterrastays.com`
→ fails with unknown error despite successful validation
2. `az staticwebapp hostname delete -n swa-canterra-prod -g rg-canterra-prod --hostname www.canterrastays.com --yes`
→ Accepted (202), then Fails after ~10 minutes
3. Record remains in "Deleting" state permanently; no client-side path can remove it

**Expected behavior**
Delete should remove the corrupted custom domain record so the domain can be re-added.

**Subscription:** 678a78fc-be41-48cc-b123-6f4570991070
**SWA default hostname:** brave-sand-01c38990f.7.azurestaticapps.net
**Platform:** Linux consumption (Flex)

Requesting backend cleanup of the stuck record. Happy to provide anything further.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the hostname set and delete commands for the Static Web App, then compare their behavior with the direct ARM REST DELETE and portal operation described here. Done means the custom-domain record leaves the Deleting state, deletion succeeds, and www.canterrastays.com can be added again; use the listed activity-log timestamps and correlation IDs when tracing the failed operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.