What it's for
An A record is the most fundamental record type in DNS — it maps a hostname directly to an IPv4 address. When you type example.com into a browser, an A record lookup is what tells your computer "that name points to 93.184.216.34." No A record (or its IPv6 sibling, AAAA), no website.
The "A" stands for "Address." It's been part of DNS since RFC 1035 in 1987, and it's still the single most-queried record type on the internet, because almost every other lookup — HTTP requests, SSH connections, API calls — ultimately resolves down to an A or AAAA record before a TCP connection can even open.
A records are also how load balancing and failover work at the DNS level: a single hostname can have multiple A records pointing to different IPs, and resolvers will return them (often in rotating order — "round robin DNS") to spread traffic across servers.
Format & syntax
A zone file entry looks like this:
example.com. 3600 IN A 93.184.216.34
- Name — the hostname (
example.com., note the trailing dot for the fully-qualified domain name) - TTL — 3600 seconds (1 hour) here; how long resolvers should cache the answer
- Class — always
IN(Internet) in practice - Type —
A - Value — a dotted-decimal IPv4 address, and only an IPv4 address. A records that contain a hostname, CNAME target, or IPv6 address are invalid.
A hostname can have more than one A record. When it does, a resolver returns all of them, and the client (or the resolver itself) picks one — this is the basis of DNS round-robin.
How it's used in practice
- Pointing a domain at a server — the most common DNS operation there is. You get a server's IP from your host, create an A record for
@(the root domain) or a subdomain, and traffic starts flowing. - Multi-region / load-balanced setups — multiple A records for the same name, one per server or region, often combined with low TTLs and health-check-aware DNS providers (Route 53, Cloudflare Load Balancing) that pull unhealthy IPs out of rotation.
- Wildcard records —
*.example.comA records catch any subdomain that doesn't have its own explicit record, commonly used for multi-tenant SaaS apps (tenant1.example.com,tenant2.example.com, all resolving through one wildcard). - Apex/root domain limitation — because CNAME records can't coexist with other records at the zone apex, the root domain (
example.comwith no subdomain) almost always needs an A record rather than a CNAME, even when you'd conceptually prefer to alias it to another hostname. This is exactly why "ALIAS" or "ANAME" records exist as a workaround at providers like Cloudflare and Route 53 — they behave like a CNAME but get flattened to an A record at the apex.
Common mistakes & gotchas
- Stale A records after a server migration — you move to a new IP, forget to update the A record, and traffic keeps hitting the old server (or nothing, if the old IP was decommissioned) until the TTL expires and propagation catches up.
- TTL set too high before a planned migration — if your TTL is 24 hours and you need to cut over quickly, you're stuck waiting for caches to expire. Lower the TTL (to something like 300 seconds) before a planned change, wait for the old TTL to fully expire, then make the cutover.
- Confusing A and CNAME — pointing an A record's value at a hostname instead of an IP address is invalid and will fail to resolve. If you need a name to point to another name, that's what CNAME is for.
- Forgetting IPv6 entirely — an A record only covers IPv4. If you don't also add an AAAA record, IPv6-only clients (increasingly common) will still resolve your domain via IPv4 fallback, but you lose the performance and simplicity benefits of native IPv6 connectivity.
- DNS propagation confusion — a changed A record isn't instant. Resolvers around the world cache the old value until its TTL expires, so "propagation" can take anywhere from minutes to the full TTL duration (or occasionally longer, if a resolver ignores TTLs).
Comparison & FAQ
| Type | Purpose | Key difference from A |
|---|---|---|
| AAAA | Maps a hostname to an IPv6 address | Same job, IPv6 instead of IPv4 |
| CNAME | Aliases a hostname to another hostname | Points to a name, not an IP; can't coexist with other records on the same name |
| PTR | Maps an IP address back to a hostname | The reverse operation — used for reverse DNS lookups |
Can a hostname have multiple A records?
Yes — this is normal and is how basic DNS-level load balancing works. A resolver will return all of them, typically in rotating order.
What's the difference between an A record and an ALIAS/ANAME record?
An ALIAS or ANAME (provider-specific, non-standard record types) looks like a CNAME to you but gets resolved to an A record behind the scenes by the DNS provider, so it can be used at the zone apex where a real CNAME isn't allowed.
Why does my new A record still resolve to the old IP?
DNS caching. Resolvers hold onto the previous answer until its TTL expires. Use a tool like a DNS propagation checker to see what different resolvers around the world are currently returning.
Do I need an A record if I only have a CNAME?
For a subdomain, no — a CNAME is enough, since it points to another name that itself resolves via A/AAAA. For the root/apex domain, you generally do need a real A record (or a provider-specific ALIAS/ANAME workaround), since CNAMEs aren't allowed at the apex alongside required records like SOA and NS.