A What is an A Record?
An A record maps a domain or hostname to an IPv4 address. It's the most fundamental DNS record type — the one that connects domain names to web servers.
What is an A record?
An A record (Address record) maps a hostname to an IPv4 address. It's the most commonly used DNS record type — when you visit a website, a DNS resolver looks up the A record for that domain to find the server's IP address.
The "A" stands for Address. Its IPv6 counterpart is the AAAA record.
Anatomy of an A record
example.com. 3600 IN A 93.184.216.34
| Field | Value | Description |
|---|---|---|
| Name | example.com. | The hostname being mapped. Can be the root domain or any subdomain. |
| TTL | 3600 | Time-to-live in seconds. How long resolvers cache this record before re-querying. |
| Class | IN | Internet class — standard for all normal DNS records. |
| Type | A | Record type: IPv4 address. |
| Address | 93.184.216.34 | The IPv4 address the hostname resolves to. |
Multiple A records and load balancing
A hostname can have multiple A records pointing to different IP addresses. Resolvers return all of them and clients typically use the first. Different resolvers may rotate the order, providing basic round-robin load distribution.
example.com. IN A 203.0.113.1
example.com. IN A 203.0.113.2
example.com. IN A 203.0.113.3
This is a simple approach but has no health checking — if one server goes down, DNS continues to return its IP. Proper load balancers or anycast routing are more reliable for production traffic.
TTL and propagation
Lowering the TTL before a server migration gives you flexibility — if something goes wrong, DNS resolvers pick up the corrected record faster. A common pattern is to drop TTL to 300 seconds (5 minutes) an hour before the migration, then update the A record, and restore the TTL afterward.
Common uses
- Pointing a root domain (
example.com) to a web server - Pointing a subdomain (
api.example.com,mail.example.com) to specific servers - Wildcard records (
*.example.com) to catch all unspecified subdomains - Serving as the final resolution target for CNAME chains
Frequently asked questions
What is the difference between an A record and a CNAME record?
An A record maps a name directly to an IP address. A CNAME maps a name to another name (an alias), which then resolves to an IP. A records are faster (one lookup); CNAMEs add an extra lookup but let you change the underlying IP in one place.
Can I use an A record at the root domain?
Yes. A records work at the zone apex (root domain). CNAME records cannot be used at the zone apex — that's one reason A records remain essential.
What is a wildcard A record?
A record with * as the name (e.g., *.example.com IN A 93.184.216.34) matches any subdomain that doesn't have a more specific DNS record. Useful for catch-all subdomain routing.
What is a loopback A record?
127.0.0.1 is the loopback address — it always refers to the local machine. A record pointing to 127.0.0.1 makes the domain resolve to localhost, which is sometimes used in development or for blocking purposes.