A record
An A record maps a DNS name to an IPv4 address. Its IPv6 counterpart is the AAAA record. Together they are the records that finally turn a name into somewhere a connection can go.
Also called: Address record, AAAA record
What an A record holds
An A record is a name, a TTL and a 32-bit IPv4 address such as 203.0.113.10. An AAAA record is the same thing for a 128-bit IPv6 address. Every lookup that ends in a connection ends at one of these two types: a CNAME only renames the question, and eventually some name has to answer with an address.
Unlike a CNAME, an A record can share its name with anything. That is why the apex of a zone, which must also carry SOA and NS records, uses A and AAAA records for its website.
Several A records at one name
Publishing three A records at one name is legal and common. Resolvers return the whole set, usually in varying order, and clients try the addresses in turn. This spreads load a little and survives one dead address, but it is not health-checked load balancing: DNS keeps handing out an address after the server behind it goes down, until someone removes the record and the TTL runs out.
Two views of the same name can list the set in different orders and still agree. The DNS propagation checker compares answer sets, not orderings, for that reason.
A vs AAAA
Publish AAAA only if IPv6 actually works end to end. Clients that have IPv6 generally prefer it, so an AAAA pointing somewhere dead is worse than no AAAA at all: IPv6 users hit the dead address first and wait for a fallback. An absent AAAA record just means the name is IPv4-only.
A record or CNAME for a customer's domain?
For a subdomain, ask for a CNAME. It keeps your addresses yours to change. For an apex domain, a CNAME is not allowed, and an A record is the portable answer, but it has a real cost:
- Your IP addresses become a contract. Every connected customer's zone holds them. Changing them means asking every customer to edit DNS again, or leaving the old addresses answering forever.
- The addresses must be stable and yours. An anycast edge or reserved load-balancer addresses work. The ephemeral IP of a single VM does not.
- Verification pins the value. A connection verified against
203.0.113.10stays verified only while that is what the name resolves to, which is exactly what drift monitoring should tell you about.
The apex-domain guide describes how DoDomain handles A and AAAA records at @ on each connect path, including one-click apply.
Changing an A record
The new value is live at the authoritative nameservers within seconds. What takes time is caches letting go of the old value, bounded by the record's previous TTL. Lower the TTL a full TTL period before a planned move; the DNS propagation entry explains why that ordering matters.
Related
- DNS propagation checker
See the A or AAAA set at the source and at three public resolvers side by side.
- Apex domains (docs)
When A records are the right answer for a customer's root domain.
- CNAME record
The alias record, and why subdomains should prefer it.
Frequently asked questions
What is an A record in DNS?
A record type that maps a name to an IPv4 address. When a browser looks up a name, the lookup ends at an A record (or an AAAA record for IPv6) that says where to connect.
What is the difference between an A and an AAAA record?
An A record holds an IPv4 address; an AAAA record holds an IPv6 address. A name can have both, and clients with IPv6 connectivity usually try the AAAA address first.
Can a domain have more than one A record?
Yes. Several A records at one name form a set that resolvers return together, and clients try the addresses in turn. It is not health-checked: a dead address keeps being handed out until the record is removed and its TTL expires.
Should I use an A record or a CNAME?
Use a CNAME for subdomains that should follow another hostname, so the target can change its addresses freely. Use A and AAAA records at a zone apex, where a CNAME is not allowed, or when you control a stable address.