A Record vs CNAME: Which DNS Record Should You Use?

FindMyTeam April 6, 2026

If you are setting up or debugging a domain, one of the first record choices is whether the hostname should use an A or AAAA record, or a CNAME record.

That decision matters because these record types solve different problems.

The short version

  • Use an A record when the hostname should point directly to an IPv4 address.
  • Use an AAAA record when the hostname should point directly to an IPv6 address.
  • Use a CNAME record when the hostname should point to another hostname rather than directly to an IP address.

That is the cleanest mental model.

What an A or AAAA record does

An A record maps a hostname to one or more IPv4 addresses.

An AAAA record does the same thing for IPv6 addresses.

This is the direct form of DNS mapping. If you already know the origin IP or the service expects direct IP-based resolution, A and AAAA are the straightforward choice.

What a CNAME record does

A CNAME maps one hostname to another canonical hostname.

That is useful when the target service wants you to point at a provider hostname instead of hardcoding IP addresses yourself. It is common for SaaS platforms, managed load balancers, and other platforms where the underlying IPs can change.

The most important limitation

A hostname that has a CNAME record is expected to use that CNAME as its DNS identity for resolution.

That is why you generally cannot place a CNAME record on the same hostname as an A or AAAA record. DNS systems treat that as conflicting information because one answer says "this name is an alias to another name" while the other says "this name resolves directly to this IP."

That restriction is one of the most common reasons record creation fails.

So which should you use?

Use A or AAAA when:

  • you know the actual IP address you want the hostname to resolve to
  • the provider explicitly tells you to enter an IPv4 or IPv6 address
  • you want direct IP-based control of the record

Use CNAME when:

  • the provider gives you a target hostname instead of an IP
  • the service may rotate IPs behind that hostname
  • the hostname is meant to follow another hostname operationally

Why this matters in domain migrations

This choice often shows up during provider moves.

If the new provider gives you a service hostname, a CNAME is often the right shape for the subdomain. If the provider gives you explicit IPs for the service, A or AAAA records are usually the right fit.

The key is to follow the target type the provider expects instead of forcing one record type to behave like the other.

Why you might see both A and AAAA

That usually means the hostname supports both IPv4 and IPv6 resolution.

This is normal and not a conflict. The real conflict is trying to mix CNAME with A or AAAA on the same hostname.

How this appears in domain lookup

When you run Domain Lookup, one of the most useful questions is whether the hostname resolves directly with A or AAAA records or whether it aliases to another hostname first.

That affects how you interpret the hosting and delivery path behind the domain.

Common misunderstandings

"CNAME is better than A because it is more flexible"

Not universally.

CNAME is useful when you need indirection through another hostname. If you already know the correct IPs, direct A or AAAA records can be clearer.

"A record and CNAME together give extra reliability"

No. On the same hostname, that is usually conflicting DNS design, not extra resilience.

"AAAA is optional if the site works on IPv4"

Sometimes yes, but if you publish AAAA records they need to reflect working IPv6 delivery. A broken AAAA can create real user-facing problems.

FAQ

What is the simplest difference between A and CNAME?

An A record points to an IP address, while a CNAME points to another hostname.

Can I have a CNAME and an A record on the same hostname?

Generally no. That sends conflicting DNS information for the same name.

When should I use AAAA?

When the hostname should resolve directly to IPv6 addresses in addition to or instead of IPv4.

Why did my DNS provider reject a new CNAME record?

One common reason is that the same hostname already has an A, AAAA, or another CNAME record that conflicts with it.

Continue reading

Stay in the same investigation track with these closely related guides.

Tools mentioned in this article

Run the same diagnostics to follow along with the guide.