Skip to content
D1
EN
Guides

CNAME Record Explained

cname record dns · cname vs a record · dns alias record

How DNS CNAME records alias one name to another, apex limitations, conflicts with other record types, and checking CNAME with DNS Checker.

By DN01 Network Team

A CNAME (Canonical Name) record aliases one DNS name to another. Example: `www.example.com CNAME example.com`. Resolvers follow the chain until they reach A/AAAA answers.

CNAME at the same name as MX, TXT, or NS is invalid — a common exam question and production outage cause. Use the DNS Checker to confirm no conflicting types share a label.

Valid CNAME patterns

Point `www` or `app` subdomains at a SaaS target (`target.saas.com`). CDN setups often use CNAME to edge hostnames. TTL applies to the CNAME itself.

Some DNS hosts offer ALIAS/ANAME at apex to mimic CNAME behavior — that is provider-specific, not classic CNAME.

CNAME vs A record

Choose CNAME when the target IP may change without your action (managed SaaS). Choose A/AAAA when you control the address directly.

Long CNAME chains add latency; flatten where possible. DIG traces CNAME chains explicitly if the DNS Checker summary hides intermediate hops.

Frequently asked questions

Can I use CNAME at the root domain?

Classic DNS says no. Use ALIAS/ANAME or A/AAAA at apex per your DNS provider docs.

Does CNAME affect email?

Never combine CNAME with MX at the same name. Mail uses separate MX/TXT labels.

How do I detect CNAME loops?

Lookup tools will timeout or error when a CNAME points to itself indirectly — fix the chain in your zone file.