What is Email Authentication and Why Does It Matter?
When your business sends emails to clients or sends newsletters, a common problem is emails landing in Spam folders or bouncing back. The root cause is often missing or incomplete Email Authentication configuration.
Email Authentication is a set of DNS standards that allow receiving mail servers to verify that an email genuinely comes from your domain and hasn't been spoofed. It consists of three main standards:
- SPF (Sender Policy Framework) — specifies which mail servers may send email on behalf of your domain
- DKIM (DomainKeys Identified Mail) — digitally signs emails to verify content integrity
- DMARC (Domain-based Message Authentication, Reporting & Conformance) — sets policy and collects reports
Step 1: Setting Up SPF Record
An SPF Record is a DNS TXT Record that lists which mail server IP addresses are authorized to send email from your domain.
SPF Record Format
v=spf1 [mechanisms] [all]
| Mechanism | Meaning | Example |
|---|---|---|
ip4: | Allow specific IPv4 | ip4:203.0.113.10 |
ip6: | Allow specific IPv6 | ip6:2001:db8::1 |
include: | Include another domain's SPF | include:_spf.google.com |
a | Allow IP from A record | a:mail.example.com |
mx | Allow IP from MX record | mx |
~all | Softfail others (recommended) | ~all |
-all | Reject all others (strict) | -all |
SPF Example for AsiaGB Hosting
v=spf1 mx include:spf.asiagb.com ~all
Step 2: Configuring DKIM
DKIM uses public/private key cryptography to digitally sign every outgoing email, allowing recipients to verify that the content was not altered in transit.
DKIM DNS Record Format
Add a TXT Record named mail._domainkey.yourdomain.com (the selector is commonly mail):
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
Step 3: Implementing DMARC
DMARC tells receiving servers what to do with emails that fail SPF or DKIM checks, and sends reports to your specified address.
DMARC Record Format
Add a TXT Record named _dmarc.yourdomain.com:
v=DMARC1; p=none; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1; pct=100
| Parameter | Meaning | Recommended Value |
|---|---|---|
p= | Policy for failing emails | none → quarantine → reject |
rua= | Aggregate report address | mailto:[email protected] |
ruf= | Forensic report address | mailto:[email protected] |
fo= | Failure report options | 1 (report on any failure) |
pct= | Percentage subject to policy | 100 |
Recommended Rollout Strategy
3-Phase DMARC Rollout
Month 1: p=none — collect data without blocking anything
Month 2-3: p=quarantine; pct=25 — test on 25% of traffic
Month 4+: p=reject; pct=100 — block all unauthenticated email
Complete DNS Records Example
| Record Name | Type | Value |
|---|---|---|
@ | TXT | v=spf1 mx include:spf.asiagb.com ~all |
mail._domainkey | TXT | v=DKIM1; k=rsa; p=[public-key] |
_dmarc | TXT | v=DMARC1; p=none; rua=mailto:[email protected] |
Testing and Verification
Free Testing Tools
- MXToolbox — test SPF, DKIM, DMARC in one place
- mail-tester.com — send a test email and get a deliverability score
- Google Postmaster Tools — monitor deliverability for Gmail
- DMARC Analyzer — analyze DMARC aggregate reports
Command Line Testing
# Check SPF
dig TXT yourdomain.com | grep "v=spf1"
# Check DKIM
dig TXT mail._domainkey.yourdomain.com
# Check DMARC
dig TXT _dmarc.yourdomain.com
Troubleshooting Common Issues
Emails Still Going to Spam After Setup
- Verify SPF lookup count doesn't exceed 10 (DNS lookup limit)
- Confirm DKIM key in DNS matches the private key on your server
- Check if your server IP is on any blacklists via MXToolbox Blacklist Check
DMARC Fails Even Though SPF and DKIM Pass
DMARC requires Alignment — the domain in the From: header must align with the domain used in SPF or DKIM. Email forwarding can break alignment.
Best Practices
- Use 2048-bit or larger DKIM keys (1024-bit is considered weak)
- Rotate DKIM keys every 6-12 months
- Start DMARC with
p=noneand monitor for 2-4 weeks before enforcing - Review DMARC aggregate reports regularly to identify unauthorized senders
- Never use
+allin SPF (it authorizes anyone to send as your domain) - Set
v=spf1 -allandp=rejectfor subdomains not used for email
Start with Reliable Hosting and Business Email
AsiaGB Hosting supports full SPF, DKIM, and DMARC configuration via DirectAdmin. SSD storage, 99% uptime guarantee.
View Hosting PlansFrequently Asked Questions
- What is SPF?
- SPF (Sender Policy Framework) is a DNS TXT record that specifies which mail servers are authorized to send email on behalf of your domain, preventing email spoofing.
- How is DKIM different from SPF?
- DKIM uses public/private key cryptography to digitally sign emails, allowing recipients to verify the message wasn't altered in transit. SPF only checks whether the sending server is authorized.
- What is DMARC and why do I need it?
- DMARC defines what to do with emails that fail SPF or DKIM checks and provides reporting so you know who is sending email using your domain name.
- How long does it take for DNS changes to take effect?
- DNS propagation typically takes 24-48 hours, though it's often faster. You can test immediately after setup using MXToolbox or mail-tester.com.
- What happens if I configure SPF or DKIM incorrectly?
- Incorrect SPF can cause legitimate emails to be rejected. Wrong DKIM keys cause emails to be treated as spam. Always start DMARC with p=none and monitor before enforcing stricter policies.