DNS (Domain Name System) translates domain names into server addresses. Different record types control where traffic goes. Understanding them helps you configure hosting, email, and third-party services correctly.
A Record
An A record maps a domain or subdomain to an IPv4 address. It's the most common record type β your main domain points to your server's IP via an A record.
yourdomain.com. A 192.0.2.1 CNAME Record
A CNAME (Canonical Name) record maps a domain to another domain name (not an IP). It's used for subdomains like www or to point to third-party services.
www.yourdomain.com. CNAME yourdomain.com. MX Record
MX records specify which mail servers handle email for your domain. They include a priority number β lower numbers have higher priority.
yourdomain.com. MX 10 mail.yourdomain.com. TXT Record
TXT records store arbitrary text. They are commonly used for domain verification, SPF (email authentication), DKIM, and DMARC records.
yourdomain.com. TXT "v=spf1 include:mailprovider.com ~all"