Record type reference
A Record
An A record maps a hostname to an IPv4 address. It is the record a browser, mail server or app usually needs last, after any aliases are followed, to know which machine to connect to.
A record at a glance
| Field | Value |
|---|---|
| Type code | 1 |
| Defined in | RFC 1035, section 3.4.1 |
| Value | One IPv4 address, such as 192.0.2.10 |
| Allowed at the apex | Yes |
| Can share a name with | AAAA, MX, TXT and most other types, but never a CNAME |
Here is how an A record looks in a zone file:
example.com. 3600 IN A 192.0.2.10
www.example.com. 300 IN A 192.0.2.10
www.example.com. 300 IN A 192.0.2.11
The columns are the owner name, the TTL in seconds, the class (always IN on the internet), the type and the value. The two records for www form one record set (RRset): resolvers always return them together.
How A records work
When an application wants to reach www.example.com over IPv4, the operating system asks a recursive resolver for the A record set at that name. The resolver follows the delegation chain to the authoritative servers for the zone, caches the answer for the TTL, and hands back every address in the set.
If the name is a CNAME, the resolver follows the alias first and returns the chain plus the A records at the end of it. That is why dig www.example.com A can print a CNAME line before the addresses.
A records are also how name servers are found. When a zone's name servers sit inside the zone they serve, such as ns1.example.com for example.com, the parent zone publishes their A (and AAAA) records as glue, so resolvers can reach them without a circular lookup. Delegation and glue records explains that in detail.
Several A records for one name
Publishing two or more A records at the same name is normal. Resolvers and authoritative servers often rotate the order between answers, and clients usually try the first address, falling back to the next if it does not respond. This spreads load roughly, but it is not health-checked load balancing: an address that is down keeps being handed out until you remove it and the TTL expires.
For real failover, put a load balancer or anycast address behind a single A record, or use a DNS provider whose health checks withdraw failed addresses. GeoDNS and load balancing and load balancers cover the options.
TTL choices
The TTL controls how long resolvers may reuse an answer. Long TTLs (an hour or a day) cut query volume and ride out short outages at your DNS provider. Short TTLs (60 to 300 seconds) let you move a service quickly. A common pattern is to lower the TTL a day or two before a planned move, make the change, and raise it again afterwards. DNS TTL and caching walks through the trade-offs.
How to look up an A record
Each tool below sends the query to your default resolver unless you name a server. Swap in your own domain for example.com, and add a public resolver such as 1.1.1.1 to compare answers with what your network sees.
dig (macOS, Linux, WSL)
| Command | What it does |
|---|---|
| dig example.com A | The full answer, with TTL, flags and the server that replied |
| dig +short example.com A | Only the addresses, one per line |
| dig +noall +answer example.com A | Just the answer section, including any CNAME chain |
| dig @1.1.1.1 example.com A | Ask Cloudflare’s public resolver instead of your own |
| dig @ns1.example.com example.com A +norecurse | Ask the authoritative server directly, bypassing caches |
nslookup (Windows, macOS, Linux)
| Command | What it does |
|---|---|
| nslookup -type=A example.com | IPv4 addresses from your default DNS server |
| nslookup -type=A example.com 1.1.1.1 | The same question, asked of Cloudflare |
| nslookup -debug -type=A example.com | Verbose output that includes the TTL |
PowerShell (Windows)
| Command | What it does |
|---|---|
| Resolve-DnsName -Name example.com -Type A | A records with name, type, TTL and IP address columns |
| Resolve-DnsName example.com -Type A -Server 1.1.1.1 | Ask a specific resolver |
| Resolve-DnsName example.com -Type A -DnsOnly -NoHostsFile | Use DNS only: no hosts file, LLMNR or NetBIOS |
| (Resolve-DnsName example.com -Type A).IPAddress | Just the addresses, ready to use in a script |
Your browser may not see the same answer as these tools. Browsers can use DNS over HTTPS, and the hosts file or a VPN can override DNS for some names. Resolve-DnsName without -DnsOnly is the closest match to what Windows applications get.
Common mistakes
- A record and CNAME at the same name. DNS forbids it, and most providers will refuse to save it. Pick one.
- Private addresses in public DNS. Publishing 10.x, 172.16.x or 192.168.x addresses reveals internal layout and does nothing useful for outside users. Keep them in an internal zone; see split-brain DNS.
- Forgetting www or the apex. Users type both. Make sure each has an A record (or a CNAME, for www) that reaches the same site.
- Stale addresses after a move. An A record pointing at a released cloud IP can be claimed by someone else. Dangling DNS explains the risk.
- Changing the address with a long TTL still in place. Resolvers keep the old address until their cached copy expires.
A records in Domain Visualizer
Domain Visualizer looks up A records at the apex and at www on every scan, and at common subdomains in an advanced scan. Click an address to open its details: the panel adds IP details for the address, including location, network owner, ASN and reverse DNS.
FAQ
How many A records can one name have?
There is no fixed limit in the standard. Dozens work in practice, but very large sets can push the response over the UDP size limit and force a retry over TCP, so most sites keep a handful.
Can an A record point to another hostname?
No. An A record always holds an IPv4 address. To point one name at another name, use a CNAME, or your provider’s ALIAS or flattening feature at the zone apex.
Do I need an A record if I have an AAAA record?
Usually yes. Many networks and clients are still IPv4 only, so a name with only AAAA records is unreachable for them.
Sources and further reading
- RFC 1035: Domain Names, Implementation and Specification: section 3.4.1 defines the A record
- RFC 2181: Clarifications to the DNS Specification: record sets and TTLs
- BIND 9 manual: dig
- Microsoft Learn: nslookup
- Microsoft Learn: Resolve-DnsName