All guides
Home Glossary A record
Term

A record

A DNS record that maps a domain name to the corresponding IPv4 address of a host.

An A record (Address record) is a fundamental DNS record that maps a domain name or subdomain to the corresponding 32-bit IPv4 address of a host. It serves as the primary mechanism for translating human-readable hostnames into the numerical IP addresses required for network routing and internet communication. Without a valid A record, browsers and other clients cannot locate the destination server over IPv4.

How it works

When a user enters a domain name into a browser, the local stub resolver queries a recursive DNS resolver to find the corresponding IP address. If the answer is not already cached, the recursive resolver traverses the DNS hierarchy—from the root servers to the Top-Level Domain (TLD) servers, and finally to the domain's authoritative name server. The authoritative server returns the A record containing the target IPv4 address, allowing the client to establish a direct TCP/IP connection with the web server.

  • IPv4 specificity: A records strictly handle 32-bit IPv4 addresses (such as 192.0.2.1). Modern dual-stack environments pair them with AAAA records to support 128-bit IPv6 addresses.
  • Caching and TTL: Every A record includes a Time to Live (TTL) value measured in seconds. Recursive resolvers cache the record for this duration to reduce query latency and minimize load on authoritative servers.
  • Basic traffic distribution: Administrators can assign multiple A records to a single hostname. Resolvers typically cycle through these IP addresses using round-robin DNS to distribute incoming traffic across multiple servers.

Example

In a standard BIND-formatted DNS zone file, an A record defines the hostname, TTL, record class, record type, and target IPv4 address. The following snippet routes both the root domain (represented by @) and the www subdomain to a web server at 93.184.216.34:

$ORIGIN example.com.
@       3600    IN      A       93.184.216.34
www     3600    IN      A       93.184.216.34

To verify that the A record is resolving properly from the command line, DevOps engineers commonly use the dig utility:

$ dig +short example.com A
93.184.216.34

What matters when choosing a server or hosting

Because an A record points directly to a specific IPv4 address, your hosting architecture dictates how resilient and maintainable your DNS setup will be. When evaluating hosting providers or server configurations, consider the following factors:

  • Static vs. dynamic IP allocation: Production servers require dedicated, static IPv4 addresses. If a cloud instance or virtual private server releases its IP upon reboot, the A record breaks until manually updated.
  • Anycast and CDN integration: Traditional A records route users to a single geographic server location. If you require global low-latency delivery or DDoS mitigation, look for hosting platforms or Content Delivery Networks (CDNs) that provide Anycast IPv4 addresses or ALIAS/ANAME flattening at the zone apex.
  • Automated failover capabilities: Standard round-robin A records do not perform health checks; if one server goes offline, DNS continues directing a portion of traffic to the dead IP. Managed DNS providers often offer active health monitoring to automatically remove unhealthy IP addresses from the A record pool.

Common mistakes

  • Leaving high TTLs before a server migration: Keeping a TTL of 86400 seconds (24 hours) during a planned IP change forces resolvers to serve stale records for up to a full day. Lower the TTL to 300 seconds well in advance of any migration.
  • Conflicting CNAME and A records: Per DNS specifications, a hostname cannot hold both a CNAME record and an A record simultaneously, nor can a CNAME coexist with other records at the root domain (zone apex).
  • Pointing to private network IPs: Accidentally entering an internal RFC 1918 address (such as 10.0.0.5 or 192.168.1.10) in a public DNS zone makes the service unreachable from the public internet.

FAQ

Can a single domain have multiple A records?

Yes. Assigning multiple A records to the same hostname returns a list of IPv4 addresses to the client. This setup enables basic round-robin load balancing, though it does not automatically detect server outages without external DNS health checks.

What is the difference between an A record and a CNAME record?

An A record maps a hostname directly to a numerical IPv4 address, whereas a CNAME (Canonical Name) record points a hostname to another domain name. While CNAMEs simplify management when an underlying IP changes, A records require fewer DNS lookups and are mandatory at the root domain.

How long does it take for an A record change to propagate?

Propagation time depends primarily on the previous record's TTL value. Once the old TTL expires in recursive resolver caches worldwide, clients will fetch the updated IPv4 address from your authoritative name server.

All glossary terms

Glossary

Related terms

Full glossary

New guides every week.

A digest of the best pieces on servers, VPN and self-hosted software. No ads, no spam.

1 email a weekOne-click unsubscribeRU · EN
Only slipjar.app articles, nothing else.