CNAME records
Alias one hostname to another — when to use CNAME and the rules that trip people up.
1 min read
On this page
A CNAME says "this name is an alias of that name." The resolver follows it and uses the target's A/AAAA records.
text
Type: CNAME Name: www Target: example.comGood uses#
www→ the root domain.- A subdomain → a hosted service that gives you a hostname (for example a status page or storefront).
Rules#
- No CNAME at the root (
@) under standard DNS. Some providers offer "CNAME flattening" or ALIAS records to work around this. - A name with a CNAME can't have any other record (no MX or TXT on the same name).
- Don't use CNAME as an SRV target for Minecraft — SRV targets should resolve directly to an A/AAAA record.
Check#
bash
dig +short www.example.com CNAMEWas this page helpful?
