A Record

The fundamental type of DNS record that maps a domain name to an IPv4 address, enabling users to access websites using human-readable names. The 'A' stands for 'address' and this is the most basic and commonly used DNS record type.

How it works

An "Address Mapping" record, commonly known as an A Record, is the most basic type of DNS record used to point a domain or subdomain to an IP address. When you type a URL like example.com into your browser, the DNS system looks up the A Record associated with that domain to find the computer hosting the website.

Anytime someone searches for a website, a DNS lookup is initiated. The user's query is forwarded to a series of DNS servers that work together to find the location of the website in question. For DNS servers to know where to send a user, they need the numerical IP address, which is why queries are ultimately resolved according to the domain's A record. Using an A record, a web browser is able to load a website using the domain name, allowing us to access websites on the internet without needing to remember their IP addresses.

Key Points

  • A Records are exclusively used for IPv4 addresses (e.g., 192.0.2.1)
  • If you need to point a domain to an IPv6 address, you would use an AAAA Record instead
  • A Records only hold IPv4 addresses - they cannot contain any other type of data
  • The default TTL (Time To Live) for A records is typically 14,400 seconds (4 hours)

Common Use Cases

  • Root Domain Mapping: Mapping your main domain (e.g., google.com) to your web server's IPv4 address
  • Subdomain Configuration: Setting up subdomains like blog.yoursite.com or mail.yoursite.com on different servers
  • Load Balancing: Adding multiple A records for the same domain (Round Robin DNS) to distribute traffic between different IP addresses, each hosting identical content
  • Failover Configuration: Some higher profile websites have several different A records as part of load balancing to distribute request traffic to one of several IP addresses

code Example Configuration

TypeHost / NameValue / Points toTTL
A@192.0.2.13600
Awww192.0.2.13600
Amail192.0.2.103600

* The "@" symbol usually represents the root domain (e.g., example.com).

Frequently Asked Questions

Can I have multiple A records?expand_more
Yes, adding multiple A records for the same domain allows for basic load balancing (Round Robin DNS), distributing traffic across multiple servers. Each DNS query will return the IP addresses in a rotated order, helping to balance the load between servers.
What is the difference between A and CNAME?expand_more
An A record points a hostname directly to an IP address, while a CNAME record points a hostname to another hostname. Use A records for the root domain and for any hostname that needs to point directly to an IP. Use CNAMEs for subdomains or aliases when you want them to follow another hostname's IP address.
How long does it take for A record changes to propagate?expand_more
A record changes typically take effect based on the TTL (Time To Live) value. The default TTL for A records is often 14,400 seconds (4 hours), meaning it can take up to 4 hours for changes to fully propagate globally. You can set a lower TTL before making changes to speed up propagation.
Can the root domain (@) use a CNAME instead of an A record?expand_more
No, according to DNS standards (RFC 1912), you cannot use a CNAME record for your root domain. The root domain must use either an A record (for IPv4) or an AAAA record (for IPv6). This is because CNAME records cannot coexist with other record types at the same level, and root domains typically need NS and SOA records.
What format should the IP address be in an A record?expand_more
A records must contain a valid IPv4 address in dotted decimal notation, consisting of four numbers (0-255) separated by periods. For example: 192.0.2.1 or 93.184.216.34. IPv6 addresses are not supported in A records; use AAAA records instead.