A record
Learn what a DNS A record is, how it maps domains to IPv4 addresses, common uses, lookup methods, and troubleshooting tips.
What Is an A Record in DNS?
TL;DR
An A record (Address record) is the most common DNS record type. It maps a domain name (e.g. example.com) directly to an IPv4 address (e.g. 93.184.216.34), telling browsers and applications where to find the server.
How A Records Work
When you enter example.com in a browser, the DNS resolver queries for the A record and receives the IPv4 address. The browser then connects to that IP to load the website. A records support:
- Root domains (
example.com) - Subdomains (
www.example.com,api.example.com) - Multiple IPs for basic load balancing (round-robin)
Common Use Cases
- Website hosting: pointing domains and www to web servers
- Load balancing: multiple A records to distribute traffic
- CDN integration: pointing to edge server IPs
- Subdomain routing: different services (API, mail, blog) to different servers
- Email & API resolution: locating mail servers or API endpoints
How to Lookup A Records
dig example.com Anslookup -type=A example.comRecord Format
NAME TTL CLASS TYPE VALUE
example.com. 3600 IN A 192.0.2.1- NAME: domain or subdomain (trailing dot = FQDN)
- TTL: time to live in seconds (how long resolvers cache it)
- TYPE: A
- VALUE: valid IPv4 address only
Valid Examples
example.com. A 93.184.216.34
www.example.com. A 93.184.216.34
api.example.com. A 198.51.100.10Comparing different types of records
| Feature | A | AAAA | CNAME | MX |
|---|---|---|---|---|
| Maps to | IPv4 | IPv6 | Domain | Mail server |
| IP version | IPv4 | IPv6 | — | — |
| Can exist at root | Yes | Yes | No | Yes |
| Multiple allowed | Yes | Yes | No | Yes |
| Load balancing | Yes (basic) | Yes (basic) | No | Yes |
| Use at apex domain | Yes | Yes | No | Yes |
Frequently Asked Questions
Can I use multiple A records for one domain?
Yes, most resolvers return all IPs; clients often pick one (basic round-robin).
How long does it take for A record changes to propagate?
Usually 5 minutes to 48 hours. Depends on TTL + resolver caching.
Can I have an A record and CNAME for the same name?
No, DNS forbids it. Choose one.
References
Related DNS Record Types
- AAAA Record: Maps domains to IPv6 addresses
- CNAME Record: Creates domain aliases
- NS Record: Specifies name servers