Back to Tools

A Record vs CNAME: Interactive Comparison

Understand the difference between A records and CNAME records with an interactive guide. Includes scenario-based recommendations, DNS resolution visualization, common mistakes, and a quick reference for all DNS record types.

About this tool

A records and CNAME records are the two most common DNS record types, and choosing the wrong one can break your website, slow down your loading time, or cause email delivery failures. The short version: A records point directly to IP addresses, CNAMEs point to other domain names. But the decision of which to use depends on your specific situation.

This interactive guide helps you pick the right record type for your scenario — whether you're setting up a root domain, connecting a subdomain to an external service, configuring a CDN, or setting up email authentication. Select your use case and get a specific recommendation with example DNS records you can copy.

For email-specific DNS setup, check our SPF checker, DKIM checker, and DMARC checker to verify your email authentication records. Use our CNAME lookup tool to check existing CNAME records, and our MX lookup to verify mail server configuration.

Understanding DNS is especially important for email marketing. When you set up a platform like Sequenzy, you'll add CNAME records for DKIM authentication and TXT records for SPF. Getting these wrong means your emails land in spam. Our deliverability score tool checks all of this for you in one scan.

Frequently Asked Questions

What is the main difference between A records and CNAME records?

An A record maps a domain name directly to an IPv4 address (e.g., example.com → 93.184.216.34). A CNAME record maps a domain name to another domain name (e.g., blog.example.com → example.wordpress.com). The key difference: A records are direct pointers to servers, while CNAMEs are aliases that eventually resolve to an A record. CNAMEs follow changes automatically, A records need manual updates when IPs change.

Can I use a CNAME record on my root domain?

No. The DNS specification (RFC 1034) prohibits CNAME records at the zone apex (root domain like example.com). This is because CNAME cannot coexist with other record types, and root domains require SOA and NS records. Some DNS providers offer workarounds: Cloudflare has 'CNAME flattening', Route53 has 'ALIAS', and DNSimple has 'ALIAS records.' These resolve the CNAME internally and return A records to clients.

Which is faster, A record or CNAME?

A records are slightly faster because they resolve in one DNS query. CNAME records require at least two queries: first to resolve the CNAME to another domain name, then to resolve that domain to an IP. In practice, DNS caching makes this difference negligible — both are resolved in milliseconds. The management benefits of CNAME (automatic IP following) usually outweigh the tiny speed difference.

Why can't I have a CNAME and other records on the same subdomain?

The DNS specification states that if a CNAME exists for a name, it must be the only record for that name. This means you can't have a CNAME alongside MX records (for email), TXT records (for SPF/DMARC), or any other type. This is the main technical reason CNAME can't be used on root domains — root domains need MX records for email and NS records for DNS delegation.

When should I use A records for subdomains?

Use A records when: (1) you control the server and its IP is stable, (2) you need other record types on the same subdomain (like MX or TXT), (3) you want the fastest possible DNS resolution, or (4) you're pointing to a server with a dedicated/static IP. If none of these apply, CNAME is usually the better choice for subdomains.

What is an ALIAS or ANAME record?

ALIAS (or ANAME) is a non-standard record type offered by some DNS providers (Cloudflare, Route53, DNSimple) that behaves like a CNAME at the root domain level. The DNS provider resolves the CNAME chain internally and returns A records to clients, so it looks like a regular A record but follows a CNAME target. This solves the 'no CNAME at root domain' problem but isn't universally supported across all DNS providers.

Do A records or CNAMEs affect email deliverability?

Indirectly, yes. Email authentication records (SPF, DKIM, DMARC) use TXT and CNAME record types. DKIM is typically set up via CNAME records pointing to your email provider's key servers. SPF and DMARC use TXT records. If these are misconfigured, your emails may fail authentication checks and land in spam. The A record itself doesn't affect email, but the overall DNS configuration matters greatly for deliverability.

How do I check what type of record my domain uses?

Use our CNAME lookup tool to check if a domain has a CNAME record and see the resolution chain. For MX records (email), use our MX lookup tool. For SPF, use our SPF checker. You can also use command-line tools like 'dig example.com A' or 'nslookup -type=CNAME blog.example.com' to query specific record types directly from your terminal.