‎Deleting a custom domain from an Azure Static Web App is failing

Daniel M 5 Reputation points
2026-08-12T00:12:24.03+00:00

Hi all. I have an Azure static web app to which I added a custom domain/subdomain. There was an issue with the DNS config on Cloudflare, and the validation failed. I couldn't regenerate a new code, so I deleted the domain so I could re-add, but the deletion is failing. I have tried in Cloud Shell with az staticwebapp hostname delete \ and az rest --method delete , but still no success.

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.


3 answers

Sort by: Oldest
  1. Allan Solomon Mejia 7,915 Reputation points
    2026-08-12T01:03:33.5766667+00:00

    Hello @Daniel M

    Since you've already tried both:

    az staticwebapp hostname delete
    

    and the ARM REST DELETE operation without success, this likely isn't just a Portal issue.

    First, check the current backend state:

    az staticwebapp hostname show \
      --name <app-name> \
      --resource-group <resource-group> \
      --hostname <domain>
    

    and:

    az staticwebapp hostname list \
      --name <app-name> \
      --resource-group <resource-group>
    

    These are the supported CLI commands for inspecting Static Web App custom-domain resources.

    If the domain remains in Deleting or another failed provisioning state after a reasonable period, I would not repeatedly delete/recreate DNS records or the Static Web App itself.

    There have been similar recent reports where Static Web App custom-domain deletion became stuck after validation/provisioning failures. In a July 2026 case, Microsoft investigated the issue and subsequently confirmed that mitigation had been applied.

    At that point, I recommend opening an Azure Support case or asking a Microsoft moderator to help escalate it to the Azure Static Web Apps team. Provide:

    • Static Web App name and region
    • Custom domain
    • UTC timestamp of the failed deletion
    • Activity Log correlation/request ID
    • Output/status from az staticwebapp hostname show

    Don't post your subscription ID or other sensitive information publicly.

    Since both CLI and REST deletion are failing, this may require the Static Web Apps team to clear or repair the stale custom-domain association on the service side.

    Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.

    Was this answer helpful?

    0 comments No comments

  2. Andrew Taylor - COREZENN 1,390 Reputation points Volunteer Moderator
    2026-08-12T01:31:01.59+00:00

    Hi @Daniel M

    Thanks for the details and for reaching out to Microsoft Q&A. This looks like a backend "stuck deleting" state rather than something wrong on your end. I've seen this pattern in a couple of other threads: once a custom domain fails validation and gets stuck, the hostname resource can get wedged in a "Deleting" state that neither az staticwebapp hostname delete nor az rest --method delete (nor the Portal) can clear, because it's an internal backend sync issue, not a DNS or CLI problem (learn.microsoft.com/answers/a/12860499).

    A quick way to confirm current state before doing anything else:

    az staticwebapp hostname list --name <app> --resource-group <rg>
    

    If it still shows the domain stuck (e.g. in "Deleting"), further delete attempts from your side aren't likely to help — in similar cases this only cleared once Microsoft Support released the wedged resource on the backend (learn.microsoft.com/answers/a/12860255).

    I'd suggest opening a support ticket and including:

    • The Static Web App resource ID and the exact hostname stuck
    • Current status from az staticwebapp hostname list
    • Confirmation of what you've tried (hostname delete, az rest --method delete, Portal)

    Support should be able to manually clear the wedged state so you can re-add the domain cleanly. Also worth double-checking the Cloudflare DNS records are fully correct now, just to rule that out before support looks at it — though the delete failure itself looks backend-related rather than DNS-related.

    Please 'Upvote'(Thumbs-up) and 'Accept' as answer if the response was helpful. This will be benefitting other community members who face the same issue.

    Best regards, Andrew S Taylor

    Was this answer helpful?

    0 comments No comments

  3. Ajay Rathod 440 Reputation points Microsoft External Staff Moderator
    2026-08-13T17:29:26.5733333+00:00

    Thank you for your patience while we looked into this.

    We have received confirmation that mitigation has been applied, and your custom domain issue should now be resolved. Could you please retry the operation and verify whether everything is working as expected?

    If you are still experiencing any issues, please reply with an update and any relevant details. We will be happy to continue assisting you and investigate further if needed.

    We look forward to hearing back from you.

    If the answer is helpful,  Please do click "Accept the answer” and Yes, this can be beneficial to other community members.

    If you have any other questions, let me know in the "comments" and I would be happy to help you

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.