A record vs CNAME: the short answer
| A record | CNAME | |
|---|---|---|
| Points to | An IPv4 address, e.g. 203.0.113.10 |
A hostname, e.g. shop.example.net. |
| RR type number | 1 | 5 |
| Allowed at the root domain | Yes | No |
| Can share a name with MX or TXT | Yes | No, a CNAME must be alone on its name |
| Who updates the address | You | The owner of the target name |
| Extra lookup for resolvers | No | Usually one more step to follow the alias |
| Proxy switch in Bridge DNS | Yes | No (proxy works on A and AAAA only) |
What an A record does
An A record is the end of the line. It maps a name directly to an IPv4 address, and resolvers return that address without following anything else. If your server moves, you change the record yourself.
That makes A records the right choice for servers you run: a VPS, a dedicated box, a load balancer with a fixed address. They're also the only option at the root domain, together with AAAA for IPv6, because the apex can't hold a CNAME.
In Bridge DNS, every A record also has a proxy switch. With it on, the public answer becomes the Bridge edge and your server's address stays private. The full syntax, setup steps and checks are in the A record reference.
What a CNAME does
A CNAME says "this name is an alias for that one." When a resolver hits www.example.com CNAME example.net., it restarts the lookup for example.net and returns whatever addresses that name has. The platform behind example.net can change its IPs as often as it likes, and your record never needs editing.
The catch is exclusivity. RFC 1034 §3.6.2 and RFC 2181 §10.1 say an aliased name can't have any other record. No MX, no TXT, nothing. And because the root domain always carries SOA and NS records, the root can't be aliased. The CNAME reference covers subdomain setup, conflicts and loops in detail.
When to use an A record
Most A record vs CNAME decisions come down to one question: who controls the address? Pick an A record when:
- you host the site yourself and know the IPv4 address;
- the name is the root domain,
example.com; - the same name also needs MX or TXT records;
- you want the Bridge proxy to hide the origin.
When to use a CNAME
Pick a CNAME when:
- a hosted platform (a store builder, a help desk, a docs host) tells you to point a subdomain at its hostname;
- the target's addresses change and you don't want to track them;
- you want
wwwto follow whatever the root domain points to.
For hosted services, follow the provider's instructions to the letter. If they ask for that record type, an A record with today's IP will break the day they move you.
Can you use both together?
Yes, on different names. The A record or CNAME choice is made per name, not per domain, and mixing them is the most common setup:
@ 60 IN A 203.0.113.10
www 60 IN CNAME example.com.
The root holds the address and www follows it. Change the A record once and both names move.
What you can't do is chain carelessly. An aliased name pointing at another aliased name works, but each hop adds a lookup and another chance to break. A chain that loops back on itself never resolves. Keep a CNAME chain to one hop where you can. Also, never point an MX or NS record at an aliased name. RFC 2181 §10.3 requires those targets to be names with their own address records.
Why people mix up CNAME vs A record
Mostly because both "point a domain somewhere," and many dashboards put them side by side with no explanation. A second source of confusion is the alias family: ALIAS, ANAME and CNAME flattening. Some DNS hosts offer these to fake a CNAME at the root domain. They return A records to resolvers while tracking a hostname behind the scenes. They aren't a standard record type, and they behave differently from host to host.
If the platform supplies an origin IP, a proxied A record at the apex can point to it via the Bridge edge.
How to check which one a name uses
Run dig with no record type filter:
dig www.example.com +noall +answer
www.example.com. 60 IN CNAME example.com.
example.com. 60 IN A 203.0.113.10
A CNAME line followed by an A line means an alias. A single A line means a direct address. Auto TTL resolves to 60 seconds for A, AAAA, and CNAME records and 120 seconds for every other record type. Previously cached answers follow their original TTLs.
A record vs CNAME: questions
Is a CNAME slower than an A record?
Slightly, in theory, because the resolver follows one more name. In practice the authoritative server often returns the target's A record in the same answer, and caches make the difference too small to notice.
Can I use a CNAME for my root domain?
No. The root domain holds SOA and NS records, and a CNAME can't share a name with other records. Use an A or AAAA record there. In Bridge DNS, a proxied A record is the usual alternative.
Should www be an A record or a CNAME?
Either works. A CNAME pointing www at the root domain is easier to maintain, because you only update one address. Use an A record if www needs its own MX or TXT records.
When should I use CNAME vs A record?
Use an A record for servers you control and for the root domain. Use a CNAME when a hosted platform gives you a hostname for a subdomain, so its address changes reach you automatically.
What's the difference between A record and CNAME for email?
Mail needs MX records, and an MX target must be a hostname with its own A or AAAA record, never a CNAME. A name that already has a CNAME can't hold MX or TXT records either.