DNS Record Types Explained: A, AAAA, CNAME, MX, and More

10 min readNameProbe
## What Are DNS Records? DNS (Domain Name System) records are instructions stored on DNS servers that tell the internet how to handle requests for a domain. Each record type serves a specific purpose, from mapping a domain to an IP address to routing email or verifying domain ownership. Understanding these records is essential for managing your domain's web hosting, email, and security. ## Core Record Types **A Record** — Maps a domain to an IPv4 address (e.g., 93.184.216.34). This is the most fundamental record type and is required for any domain that serves a website. **AAAA Record** — Maps a domain to an IPv6 address (e.g., 2606:2800:220:1:248:1893:25c8:1946). As IPv6 adoption grows, adding AAAA records ensures your site is accessible on modern networks. **CNAME Record** — Creates an alias from one domain to another (e.g., www.example.com → example.com). CNAME records cannot coexist with other record types at the same name. **MX Record** — Directs email to the correct mail server. Priority values determine the order in which servers are tried. Lower numbers indicate higher priority. ## Additional Important Records **TXT Record** — Stores arbitrary text data, commonly used for email authentication (SPF, DKIM, DMARC), domain verification (Google Search Console, SSL certificates), and security policies. **NS Record** — Specifies the authoritative name servers for a domain. These records are set at the registrar level and delegate DNS authority to specific servers. **SOA Record** — Contains administrative information about the DNS zone, including the primary name server, responsible party email, and refresh intervals. **SRV Record** — Defines the location of specific services (host and port), used by protocols like SIP, XMPP, and LDAP. ## Configuration Best Practices Always set appropriate TTL (Time to Live) values — lower TTLs (300 seconds) allow faster propagation for frequent changes, while higher TTLs (3600+ seconds) reduce DNS query load. When migrating services, lower TTLs in advance, make the change, verify it works, then raise TTLs back. Use CNAME records for subdomains pointing to external services (like CDNs or SaaS platforms) and A/AAAA records for your root domain. Always configure SPF, DKIM, and DMARC TXT records to protect your domain from email spoofing.