Cannot delete custom domain CDN

Fa-8827 1 Reputation point
2021-10-06T15:59:03.17+00:00

Trying to delete a custom domain on a CDN but get the following error. This was a PoC for a bug bounty but can't seem to delete my custom domain on the CDN resource. How would I go about actually deleting it? (Without updating the DNS)

I already tried:

az feature register --namespace Microsoft.Network --name BypassCnameCheckForCustomDomainDeletion

but to no avail.

The error message is:

(Conflict) Cannot delete custom domain "XXXX" because it is still directly or indirectly (using "cdnverify" prefix) CNAMEd to CDN endpoint "XXXX.azureedge.net".
Please remove the DNS CNAME record and try again.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,606 questions
{count} votes

6 answers

Sort by: Most helpful
  1. Will 保哥 61 Reputation points
    2022-01-12T13:40:18.363+00:00

    I think the following command works. You just need to wait for more than 10 minutes to effect.

    az feature register --namespace Microsoft.Network --name BypassCnameCheckForCustomDomainDeletion

    You can check the registering status by this:

    az feature list -o table --query "[?contains(name, 'Microsoft.Network/BypassCnameCheckForCustomDomainDeletion')].{Name:name,State:properties.state}"

    2 people found this answer helpful.

  2. Tom Plant 6 Reputation points
    2023-01-24T02:40:51.08+00:00

    CDNs are in the Microsoft.Cdn namespace, so you need to register its equivalent feature:

    az feature register --namespace Microsoft.Cdn --name BypassCnameCheckForCustomDomainDeletion

    1 person found this answer helpful.
    0 comments No comments

  3. SaiKishor-MSFT 17,156 Reputation points
    2021-10-08T18:03:09.92+00:00

    We are working offline with the customer regarding this issue and will update with the resolution once we have it. Thank you!

    0 comments No comments

  4. Anonymous
    2021-11-09T17:04:14.477+00:00

    I am having the same issue, any information on this?

    0 comments No comments

  5. Sander de Koning 1 Reputation point
    2022-01-31T21:00:18.81+00:00

    Same issue here. I'm not in control of the DNS registrations.

    0 comments No comments