Understanding DNS records.
DNS records are instructions stored in authoritative DNS servers that provide information about a domain, including IP addresses and how to handle requests.
A record
Maps a domain name to an IPv4 address. This is the most fundamental type of DNS record that tells browsers where to find your website.
example.com → 192.0.2.1
AAAA record
Similar to A records, but maps a domain to an IPv6 address instead of IPv4. Essential for modern internet infrastructure.
example.com → 2001:0db8:85a3::8a2e:0370:7334
CNAME record
Creates an alias from one domain to another. Useful for subdomains pointing to the same destination without duplicating IP addresses.
www.example.com → example.com
MX record
Specifies the mail servers responsible for accepting email messages for a domain. Includes priority values for redundancy.
example.com → mail.example.com (priority: 10)
TXT record
Holds text information for various purposes including SPF, DKIM, domain verification, and other administrative data.
v=spf1 include:_spf.example.com ~all
NS record
Delegates a DNS zone to use specific authoritative name servers. Critical for DNS hierarchy and delegation.
example.com → ns1.nameserver.com
DNS best practices.
Follow these recommendations to ensure your DNS configuration is secure, performant, and reliable.
Security recommendations
- Implement DNSSEC to protect against DNS spoofing and cache poisoning attacks
- Use SPF and DKIM records to prevent email spoofing and improve deliverability
- Regularly audit and update DNS records to maintain security posture
- Use CAA records to control which certificate authorities can issue certificates
Performance tips
- Set appropriate TTL values to balance caching efficiency with update speed
- Use CDN and geographic DNS routing for better global performance
- Implement redundant DNS servers across multiple providers for high availability
- Monitor DNS resolution times and optimize for faster lookups