The error occurs because Azure CDN requires a valid CNAME record pointing your domain (e.g., contoso.com) to the CDN endpoint (cdn-name.azureedge.net) before allowing you to associate the domain. However, contoso.com (apex or root domain) cannot directly have a CNAME record due to DNS restrictions. Root domains cannot use CNAME records but can use ALIAS/ANAME.