These are the most fundamental DNS record types that you will encounter when managing domains or understanding DNS.
- A Record (Address Record): The most fundamental DNS record type. An A record maps a domain name to an IPv4 address. For example, example.com → 93.184.216.34. When you type a domain into your browser, the DNS resolver returns the A record to tell your browser which server to connect to. Every website needs at least one A record. A domain can have multiple A records pointing to different IP addresses for load balancing and redundancy.
- AAAA Record (IPv6 Address Record): The AAAA record serves the same purpose as the A record but for IPv6 addresses. For example, example.com → 2606:2800:220:1:248:1893:25c8:1946. As IPv6 adoption grows, AAAA records are becoming increasingly important. Modern DNS resolvers query for both A and AAAA records, and the device or browser decides which to use based on its network configuration and capabilities. If a domain has both IPv4 and IPv6 addresses, devices with IPv6 connectivity will typically prefer the AAAA record.
- CNAME Record (Canonical Name Record): A CNAME record creates an alias from one domain to another. Instead of pointing directly to an IP address, it points to another domain name. For example, www.example.com → example.com. When the resolver encounters a CNAME, it follows the chain and looks up the A or AAAA record for the target domain. CNAME records are useful for pointing multiple subdomains to the same server — if the server's IP changes, you only need to update one A record instead of updating every subdomain individually. Note that CNAME records cannot be used at the zone apex (the bare domain like example.com) — they are only valid for subdomains.
- MX Record (Mail Exchange Record): MX records direct email to the correct mail server for a domain. When someone sends an email to user@example.com, the sending mail server queries the MX records for example.com to find out which server should receive the email. MX records include a priority value — a lower number indicates higher priority. For example, a domain might have MX records pointing to mail1.example.com (priority 10) and mail2.example.com (priority 20). Email servers try the highest priority (lowest number) first, falling back to the next if the primary is unavailable. This provides email redundancy and reliability.