A record

The DNS record type that maps a hostname to an IPv4 address. The fundamental routing primitive of the internet.

An A record (address record) is the DNS entry that maps a hostname to an IPv4 address. A example.com 93.184.216.34 tells resolvers "when someone asks for example.com, give them 93.184.216.34."

Anatomy

example.com.   A   93.184.216.34   ; TTL 3600
  • Name (example.com.): the hostname being defined.
  • Type (A): IPv4 address mapping.
  • Value (93.184.216.34): the IPv4 the hostname resolves to.
  • TTL (3600): how long resolvers should cache this answer in seconds.

The IPv6 equivalent is AAAA. A and AAAA records are the only DNS record types that resolve directly to IP addresses; CNAMEs delegate to other names.

When to use an A record

  • You're publishing a host that doesn't change IP often (a static IP, an anycast IP).
  • You're working at the apex of a domain and can't use a CNAME.

When NOT to use one

  • The IP changes often (rotating load balancer, cloud-managed service). Use a CNAME to a stable hostname instead.
  • Your provider gives you a hostname (d-aabbcc.cloudfront.net), not an IP. Use a CNAME.

Multiple A records

You can have several A records for the same hostname. Resolvers return all of them; clients typically connect to one (the first, often randomized). This is the cheapest form of DNS-based load balancing and is how Cloudflare, Route 53, and others spread traffic across multiple edge IPs.

Want this handled for you? Start free with Domainee — 50 custom domains + 100 GB bandwidth, no card.