DNS records are the instructions that tell the internet where to find your website, where to send your email, and how to handle various services for your domain. Mastering these records is essential for anyone managing a website.
Understanding Common DNS Record Types
A Record (Address Record)
The most fundamental record. It points your domain or subdomain to an IPv4 address.
- Purpose: Connect
yourdomain.comto your web server's IP. - Example:
@ → 192.0.2.1(points root domain) - TTL: Time To Live - how long DNS servers cache this info (300-3600 seconds is typical).
AAAA Record (IPv6 Address Record)
The IPv6 version of an A record, pointing to a 128-bit IPv6 address.
- Purpose: Future-proof your domain for IPv6 networks.
- Example:
@ → 2001:0db8:85a3:0000:0000:8a2e:0370:7334
CNAME Record (Canonical Name)
Creates an alias, pointing one domain name to another domain name.
- Purpose: Point
www.yourdomain.comtoyourdomain.com. - Example:
www → yourdomain.com - Important: Never use CNAME for the root domain (
@).
MX Record (Mail Exchange)
Directs email for your domain to your mail servers.
- Purpose: Tell the world where to send email for
@yourdomain.com. - Example:
@ → mailserver.yourprovider.com(Priority: 10) - Priority: Lower numbers = higher priority. Use multiple records for redundancy.
TXT Record (Text Record)
Holds text information for various purposes, most commonly for verification and security.
- Common Uses:
- SPF:
v=spf1 include:_spf.google.com ~all(prevents email spoofing) - DKIM: Cryptographic signature for email authentication
- Domain Verification: Proving ownership to services like Google Search Console
- SPF:
Practical DNS Configuration Examples
A Record:@ → 192.0.2.1(Website IP)CNAME Record:www → yourdomain.comMX Record:@ → mx1.emailprovider.com(Priority 10)TXT Record:@ → "v=spf1 include:spf.emailprovider.com ~all"
Best Practices for DNS Management
- Use Descriptive Names: Name subdomains clearly (e.g.,
blog.,shop.,mail.). - Set Appropriate TTLs: Use longer TTLs (3600+) for stable records, shorter (300) for records you might change soon.
- Double-Check Values: A single typo in an IP address can make your site unreachable.
- Keep Records Clean: Remove outdated or unused records to avoid confusion.
- Use Our DNS Templates: PulsaDNS provides pre-configured templates for common setups.
DNS might seem technical at first, but with practice, managing these records becomes straightforward. Start with the basics, test changes in a staging environment if possible, and remember that DNS changes can take up to 48 hours to propagate globally.