Email Deliverability Guide - Avoiding Spam Folders
This guide helps ensure your password reset emails (and other transactional emails) reach users' inboxes instead of spam folders.
1. Domain Authentication (Critical)
The most important step is to set up proper domain authentication records (SPF, DKIM, DMARC) in your DNS.
SPF (Sender Policy Framework)
SPF tells email servers which servers are authorized to send emails from your domain.
Add to your DNS (TXT record):
For Resend:
v=spf1 include:_spf.resend.com ~all
Or if you're using multiple email services:
v=spf1 include:_spf.resend.com include:_spf.google.com ~all
DKIM (DomainKeys Identified Mail)
DKIM adds a digital signature to emails to prove they came from your domain.
Resend automatically provides DKIM records:
- Go to Resend Dashboard → Domains
- Select your verified domain
- Copy the DKIM records (usually 3 CNAME records)
- Add them to your DNS
Example DKIM records from Resend:
resend._domainkey.yourdomain.com → CNAME → [resend-provided-value]
DMARC (Domain-based Message Authentication)
DMARC tells email servers what to do with emails that fail SPF or DKIM checks.
Add to your DNS (TXT record):
Start with a relaxed policy:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
After monitoring for a few weeks, tighten it:
v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com; ruf=mailto:dmarc@yourdomain.com
Eventually, enforce strict policy:
v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com; ruf=mailto:dmarc@yourdomain.com
Verify DNS Records
Use these tools to verify your DNS records are correct:
- MXToolbox SPF Checker
- MXToolbox DKIM Checker
- MXToolbox DMARC Checker
- Mail-Tester - Comprehensive email test
2. Email Content Best Practices
Subject Line
✅ Good:
- "Reset your HiveJournal password"
- "Password reset request for HiveJournal"
- "HiveJournal: Reset your password"
❌ Bad:
- "URGENT: Reset Password NOW!!!"
- "Click here to reset"
- "Free password reset"
Email Body
✅ Do:
- Use clear, professional language
- Include your brand/company name
- Explain why they're receiving the email
- Include a clear call-to-action
- Add an expiration time for the link
- Include a "Didn't request this?" section
- Use proper HTML structure
- Include plain text version
❌ Don't:
- Use excessive capitalization
- Use too many exclamation marks
- Include suspicious links
- Use URL shorteners
- Include attachments
- Use spam trigger words (free, urgent, click here, etc.)
Example Good Email Template
Subject: Reset your HiveJournal password
Hi there,
We received a request to reset the password for your HiveJournal account.
Click the link below to reset your password:
[Reset Password Button/Link]
This link will expire in 1 hour for security reasons.
If you didn't request this password reset, please ignore this email.
Your password will remain unchanged.
If you have any questions, please contact us at support@hivejournal.com.
Thanks,
The HiveJournal Team
3. Sender Reputation
Use a Dedicated Subdomain
Consider using a subdomain for transactional emails:
- Main domain:
hivejournal.com - Email subdomain:
mail.hivejournal.comornoreply.hivejournal.com
This protects your main domain's reputation.
Warm Up Your Domain
If using a new domain or subdomain:
- Start with low volume
- Gradually increase email volume
- Monitor bounce rates and spam complaints
- Maintain high engagement (opens, clicks)
Monitor Your Reputation
Check your domain reputation:
4. Resend-Specific Recommendations
Verify Your Domain in Resend
- Go to Resend Dashboard → Domains
- Add your domain
- Add all required DNS records (SPF, DKIM, DMARC)
- Wait for verification (usually a few minutes to hours)
- Use verified domain for sender email
Use Verified Sender Email
Always use an email address from your verified domain:
- ✅
noreply@hivejournal.com - ✅
no-reply@hivejournal.com - ✅
support@hivejournal.com - ❌
noreply@gmail.com(unverified domain)
Monitor Resend Dashboard
- Check Emails section for delivery status
- Monitor bounce rates
- Check spam complaints
- Review delivery analytics
5. Technical Best Practices
Email Headers
Ensure proper email headers:
From: Use verified domain emailReply-To: Set to a monitored email addressList-Unsubscribe: Not needed for transactional emailsX-Mailer: Can identify your application
HTML Email Structure
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
<!-- Content here -->
</body>
</html>
Include Plain Text Version
Always include a plain text version alongside HTML for better deliverability.
6. Supabase Email Template Customization
Customize the Reset Password Template
- Go to Supabase Dashboard → Authentication → Email Templates
- Select Reset Password template
- Customize with best practices:
Subject: Reset your HiveJournal password
Hi there,
We received a request to reset the password for your HiveJournal account.
Click the link below to reset your password:
{{ .ConfirmationURL }}
This link will expire in 1 hour for security reasons.
If you didn't request this password reset, please ignore this email.
Your password will remain unchanged.
If you have any questions, please contact us at support@hivejournal.com.
Thanks,
The HiveJournal Team
---
HiveJournal - Your personal journaling companion
7. Testing Deliverability
Use Mail-Tester
- Go to Mail-Tester.com
- Get a test email address
- Send a password reset email to that address
- Check your score (aim for 10/10)
- Fix any issues reported
Test with Real Email Providers
Send test emails to:
- Gmail
- Outlook/Hotmail
- Yahoo
- Apple Mail
- Check spam folders
Monitor Over Time
- Track spam complaint rates (should be < 0.1%)
- Monitor bounce rates (should be < 5%)
- Track open rates (transactional emails typically 20-40%)
- Monitor click rates
8. Quick Checklist
Before sending production emails:
- Domain verified in Resend
- SPF record added to DNS
- DKIM records added to DNS
- DMARC record added to DNS
- DNS records verified with tools
- Email template follows best practices
- Sender email from verified domain
- Tested with Mail-Tester (score 8+/10)
- Tested with real email providers
- Monitored in Resend dashboard
- Set up Google Postmaster Tools
- Domain reputation checked
9. If Emails Still Go to Spam
Immediate Actions
- Check DNS records: Verify SPF, DKIM, DMARC are correct
- Check Resend dashboard: Look for delivery issues
- Test with Mail-Tester: Identify specific problems
- Review email content: Remove any spam triggers
- Check sender reputation: Use reputation checkers
Long-term Solutions
- Warm up domain: Gradually increase email volume
- Maintain engagement: High open/click rates improve reputation
- Monitor complaints: Keep spam complaints < 0.1%
- Use subdomain: Consider dedicated email subdomain
- Build reputation: Consistent sending over time