What Is the Difference Between A, AAAA, and CNAME Records?
An A record maps a name to an IPv4 address, an AAAA record maps a name to an IPv6 address, and a CNAME makes one name an alias of another name that must then be resolved.
Choose the record by the answer DNS must return
| Record | Value points to | Typical use |
|---|---|---|
| A | IPv4 address | 192.0.2.10 for a host |
| AAAA | IPv6 address | 2001:db8::10 for a host |
| CNAME | Another DNS name | www.example.test to edge.example.net |
| MX | Mail exchanger name plus preference | Inbound mail routing, not a replacement for A |
Address records answer with an address
A and AAAA records attach addresses to a domain name. A dual-stack service often publishes both so IPv4-capable and IPv6-capable clients can choose a reachable path. These records say where a name resolves at DNS level; they do not state a URL path, application protocol, TLS certificate, or service health.
Several address records can exist for one name, commonly for distribution or resilience. DNS order alone is not a complete load-balancing or failover guarantee because recursive resolvers cache answers and clients have their own address-selection and retry behavior.
A CNAME redirects DNS lookup, not web traffic
A CNAME answer tells a resolver that the owner name is an alias for a canonical name. Resolution continues until address data is found. It does not send an HTTP 301, preserve a browser URL by itself, or move content. Standard DNS rules also prevent a CNAME owner from having other data, which is why zone-apex aliasing needs provider-specific records or authoritative-server synthesis rather than an ordinary CNAME.
Plan the record change safely
- Decide whether the provider gives you an address or a target hostname.
- Publish only address families the service and network path actually support.
- Check provider rules before trying to place a CNAME at the zone apex.
- Test from more than one resolver and verify the final service over its real protocol.
A dual-stack origin with a web alias
The www lookup follows the alias and can ultimately return both addresses. The documentation ranges shown here are not deployable public service addresses.
origin.example.test. A 192.0.2.10
origin.example.test. AAAA 2001:db8::10
www.example.test. CNAME origin.example.test.
Record combinations to review before publishing
- Do not point an MX record directly to a CNAME or IP address; it names a mail exchanger host that needs address records.
- Removing an A record while leaving a broken AAAA record can create failures that affect only IPv6-capable clients.
- DNS success does not prove HTTPS success. Certificates, ports, routing, and the application still need separate checks.
Use the decision in context
Apply the choice with the DNS Lookup. Compare the neighboring decision in DNS TTL and propagation timing.
What Is the Difference Between WHOIS, DNS, and RDAP?
DNS answers how a name is delegated and resolved; RDAP returns structured registration data for domains and number resources; WHOIS is the older, largely free-text registration lookup protocol that RDAP was designed to replace.
Does a Port Number Identify an Application?
A port number identifies a transport endpoint on a host, not an application with certainty. Registered ports create useful conventions, but services can use nonstandard ports and unrelated programs can listen on a familiar one.
What Does /24 Mean After an IPv4 Address?
The /24 is a CIDR prefix length: the first 24 of an IPv4 address’s 32 bits identify the network prefix, leaving 8 bits for addresses within that block. A /24 therefore contains 256 total addresses.
A, AAAA, and CNAME decisions
Can one name have both A and AAAA records?
Yes. That is a normal dual-stack configuration when the service is reachable over both IPv4 and IPv6.
Does CNAME hide the destination hostname?
No. DNS responses can expose the alias chain, and CNAME does not act as an HTTP reverse proxy.
Standards to check before deciding
- RFC 1034: Domain Names - Concepts and Facilities
Core DNS concepts, aliases, zones, and resolver behavior.
- RFC 3596: DNS Extensions to Support IPv6
Defines the AAAA record and IPv6 reverse mapping.