CNAME Record Root

Ansh Bhatia 0 Reputation points
2025-07-05T14:14:38.28+00:00

Hello,

I want to create a CNAME record with @ (root) level of domain. But azure doesn't allowed.
Is there any other way?

Regards

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 53,675 Reputation points MVP Volunteer Moderator
    2025-07-05T14:30:11.2633333+00:00

    You're right: Azure DNS does not allow creating a CNAME record at the zone apex (root level, i.e., @) - however, this is a DNS standard limitation, not just an Azure constraint. This is because a CNAME cannot coexist with other records (like NS or SOA, which are mandatory at the apex of a domain).

    There are a few workarounds you might consider:

    1. Use an ALIAS or ANAME record (Azure's alias record)

    Azure DNS provides alias records as a workaround. You can point the apex of your domain (@) to:

    • Azure Traffic Manager
    • Azure Front Door
    • Azure CDN
    • Public IP address
    • Azure DNS zone record set

    Steps:

    1. In Azure DNS zone, add a new A record at @.
    2. Check "Alias record set".
    3. Select the Azure resource you want to point to.

    This behaves like a CNAME but is technically an A or AAAA record, which is allowed at the root.

    More at https://learn.microsoft.com/en-us/azure/dns/dns-alias

    1. Use an external DNS providers that support ANAME or ALIAS

    If you're not bound to Azure DNS, consider providers like:

    • Cloudflare – uses CNAME flattening
    • DNS Made Easy – supports ANAME
    • Namecheap – supports ALIAS/ANAME

    These let you simulate CNAME-like behavior at the root domain.

    1. Use redirection for root domain

    If your goal is to redirect root domain (e.g., example.com) to www.example.com, consider:

    • Hosting a simple redirect service on an Azure Web App or CDN.
    • Using Azure Front Door or Application Gateway to do the redirection.

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

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