A record at a glance

FieldValue
Type code1
Defined inRFC 1035, section 3.4.1
ValueOne IPv4 address, such as 192.0.2.10
Allowed at the apexYes
Can share a name withAAAA, 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)

CommandWhat it does
dig example.com AThe full answer, with TTL, flags and the server that replied
dig +short example.com AOnly the addresses, one per line
dig +noall +answer example.com AJust the answer section, including any CNAME chain
dig @1.1.1.1 example.com AAsk Cloudflare’s public resolver instead of your own
dig @ns1.example.com example.com A +norecurseAsk the authoritative server directly, bypassing caches

nslookup (Windows, macOS, Linux)

CommandWhat it does
nslookup -type=A example.comIPv4 addresses from your default DNS server
nslookup -type=A example.com 1.1.1.1The same question, asked of Cloudflare
nslookup -debug -type=A example.comVerbose output that includes the TTL

PowerShell (Windows)

CommandWhat it does
Resolve-DnsName -Name example.com -Type AA records with name, type, TTL and IP address columns
Resolve-DnsName example.com -Type A -Server 1.1.1.1Ask a specific resolver
Resolve-DnsName example.com -Type A -DnsOnly -NoHostsFileUse DNS only: no hosts file, LLMNR or NetBIOS
(Resolve-DnsName example.com -Type A).IPAddressJust the addresses, ready to use in a script
Worth knowing

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