A Record — IPv4 Address Mapping

Learn how DNS A records map domain names to IPv4 addresses. Understand syntax, TTL values, and multiple A record configurations for load balancing.

AAddress Records

Zone File Entry

example.com.    IN    A    203.0.113.50

Detailed Explanation

What Is an A Record?

An A record (Address record) is the most fundamental DNS record type. It maps a domain name directly to an IPv4 address, telling DNS resolvers exactly which server to contact when a user visits your domain.

BIND Zone File Syntax

; Basic A record
example.com.    3600    IN    A    203.0.113.50

; A record for the root domain (@ means zone origin)
@               3600    IN    A    203.0.113.50

; With explicit TTL
www             300     IN    A    203.0.113.50

The fields are: name, TTL (optional, in seconds), class (IN for Internet), type (A), and IPv4 address.

How A Record Resolution Works

When a browser requests example.com, the resolver queries the authoritative nameserver for the domain. The nameserver responds with the A record containing the IPv4 address. The browser then opens a TCP connection to that address.

The full resolution chain follows this path:

  1. Browser checks its local cache
  2. OS resolver checks the system DNS cache
  3. Recursive resolver queries the root servers
  4. Root servers point to the .com TLD servers
  5. TLD servers point to the authoritative nameserver
  6. Authoritative nameserver returns the A record

Multiple A Records for Load Balancing

You can assign multiple A records to the same domain name. DNS resolvers will rotate through them in a round-robin fashion, distributing traffic across several servers:

example.com.    300    IN    A    203.0.113.50
example.com.    300    IN    A    203.0.113.51
example.com.    300    IN    A    203.0.113.52

This is called DNS round-robin and provides basic load distribution without any additional infrastructure. Keep the TTL low (e.g., 300 seconds) so clients pick up changes quickly.

TTL Considerations

A common TTL for A records is 3600 seconds (1 hour). During DNS migrations or when you anticipate IP changes, lower the TTL to 300 seconds (5 minutes) at least 24 hours before the change. This ensures clients refresh the record quickly once you update it.

Common Mistakes

  • Missing trailing dot: In BIND zone files, example.com without a trailing dot is treated as relative to the zone origin, which can cause unexpected results.
  • Private IPs in public DNS: Pointing an A record to a private IP like 192.168.x.x will not work for external visitors.
  • Forgetting both root and www: If you set an A record for www.example.com but not example.com, visitors typing the bare domain will get a DNS failure.

Use Case

Use A records to point your domain or subdomain to a web server, application server, or any service with a static IPv4 address. This is the most common DNS record you will configure.

Try It — DNS Record Generator

Open full tool