What is DNS?
DNS (Domain Name System) translates human-readable domain names (like yourdomain.com) into IP addresses that computers use to communicate. DNS records are instructions that specify how your domain behaves.
Common DNS Record Types
A Record (Address Record)
Points a domain or subdomain to an IPv4 address.
Name: @ (or yourdomain.com)
Type: A
Value: 192.0.2.1
TTL: 14400Use cases: Point your domain to your web server, direct subdomains to specific IPs
AAAA Record (IPv6 Address)
Points a domain to an IPv6 address (newer IP format).
Name: @
Type: AAAA
Value: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
TTL: 14400CNAME Record (Canonical Name)
Creates an alias that points one domain name to another domain name.
Name: www
Type: CNAME
Value: yourdomain.com
TTL: 14400Use cases: Point www to root domain, redirect subdomains to external services
Important: CNAME records cannot be used for the root domain (@). Use A records instead.
MX Record (Mail Exchange)
Directs email to mail servers. Multiple MX records can be specified with different priorities.
Name: @
Type: MX
Priority: 10
Value: mail.yourdomain.com
TTL: 14400Note: Lower priority numbers = higher priority.
TXT Record (Text Record)
Stores text information, commonly used for verification and security.
Name: @
Type: TXT
Value: "v=spf1 include:_spf.yourdomain.com ~all"
TTL: 14400Common uses: SPF (email sender verification), DKIM, DMARC, site verification (Google, Facebook)
Managing DNS Records in cPanel
Step 1: Access Zone Editor
- Log in to your cPanel account
- Navigate to "Domains" section
- Click "Zone Editor"
Step 2: Add a Record
Click "Manage" next to your domain, then "Add Record"
- Name: Record name (@ for root, or subdomain)
- Type: Record type (A, CNAME, MX, etc.)
- Value/Address: Destination IP or domain
- TTL: Time to Live (how long to cache)
Step 3: Save Changes
Click "Add Record" to save your new DNS record.
Common DNS Configurations
Point Domain to Website
A Record:
Name: @
Value: Your server IP address
A Record:
Name: www
Value: Your server IP addressEmail Configuration
MX Records:
Priority: 0
Value: yourdomain.com
SPF Record (TXT):
Name: @
Value: "v=spf1 a mx ip4:192.0.2.1 ~all"
DMARC Record (TXT):
Name: _dmarc
Value: "v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"Understanding TTL (Time to Live)
TTL determines how long DNS records are cached before checking for updates.
3005 minutes
Use when making frequent changes
36001 hour
Balanced option
144004 hours
Standard default
8640024 hours
For stable, rarely-changed records
DNS Propagation
After making DNS changes, it takes time for updates to spread worldwide.
Local ISP
5 min - 1 hour
Most Locations
2-6 hours
Worldwide
Up to 48 hours
Check propagation: WhatsMyDNS |DNS Checker
Email DNS Records (SPF, DKIM, DMARC)
SPF (Sender Policy Framework)
Specifies which mail servers can send email from your domain.
Name: @
Type: TXT
Value: "v=spf1 a mx include:_spf.yourdomain.com ~all"
Explanation:
- a: Allow A record IP
- mx: Allow MX record servers
- ~all: Soft fail for others (mark as spam)DKIM (DomainKeys Identified Mail)
Adds digital signature to outgoing emails.
Name: default._domainkey
Type: TXT
Value: "v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY"DMARC (Domain-based Message Authentication)
Tells receiving servers what to do with failed SPF/DKIM checks.
Name: _dmarc
Type: TXT
Value: "v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com"
Policies:
- p=none: Monitor only
- p=quarantine: Mark as spam
- p=reject: Reject the emailTroubleshooting DNS Issues
Website Not Loading
- • Verify A record points to correct IP
- • Check DNS propagation status
- • Clear browser cache
- • Test with different DNS server
Email Not Working
- • Verify MX records are correct
- • Check priority values (lower = higher priority)
- • Confirm SPF record is valid
- • Test with MX lookup tools
Subdomain Not Resolving
- • Check A or CNAME record exists
- • Verify record is for correct subdomain
- • Wait for propagation
- • Check for typos in record name
Best Practices
- • Always backup current records before making changes
- • Lower TTL before making major changes
- • Use descriptive names for records
- • Test changes in staging environment first
