Email Authentication: SPF, DKIM, and DMARC Setup
Email authentication protocols help prevent email spoofing, improve deliverability, and protect your domain reputation. This guide explains how to set up SPF, DKIM, and DMARC records for use with SendSquared.
Understanding Email Authentication
Email authentication consists of three key protocols:
- SPF (Sender Policy Framework): Verifies the IP addresses authorized to send email on behalf of your domain
- DKIM (DomainKeys Identified Mail): Adds a digital signature to verify emails haven't been tampered with
- DMARC (Domain-based Message Authentication, Reporting & Conformance): Tells receiving servers how to handle messages that fail authentication
Setting up these protocols is essential for:
- Improving email deliverability
- Preventing your emails from being marked as spam
- Protecting your domain from being spoofed by malicious actors
- Building and maintaining your sender reputation
SPF Records Explained
The Sender Policy Framework (SPF) is an open standard aimed at preventing sender address forgery.
How SPF Works
SPF verifies that the IP address sending an email is authorized to send mail on behalf of the domain in the email's Envelope From or Return-Path:
- The receiving email server retrieves the SPF record from the DNS records for your domain
- The server checks if the sending IP address is listed in the SPF record
- If the check passes, the email continues to processing
- If the check fails, the email may be rejected or flagged as suspicious
SendSquared's SPF Records
To allow SendSquared to send emails on your behalf, you need to include SendSquared's SPF record in your domain's DNS settings:
include:_spf.sendsquared.com
Setting Up Your SPF Record
If you don't have an existing SPF record, create a TXT record with:
v=spf1 include:_spf.sendsquared.com ~all
If you already have an SPF record, add SendSquared's include statement:
v=spf1 [your existing includes] include:_spf.sendsquared.com ~all
DKIM Configuration
DomainKeys Identified Mail (DKIM) adds a digital signature to your emails that verifies they haven't been modified in transit.
How DKIM Works
- SendSquared generates a pair of cryptographic keys for your domain
- You add the public key to your DNS records
- SendSquared uses the private key to sign outgoing emails
- Receiving servers verify the signature using the public key in your DNS
Setting Up DKIM with SendSquared
When you complete Domain Authentication in SendSquared, automated security is enabled by default, which handles DKIM records for you:
- Navigate to Global Settings → Domain Authentication
- Select the domain you want to authenticate
- SendSquared will provide CNAME records you need to add to your DNS
- Add these CNAME records to your domain's DNS settings
- Return to SendSquared and verify the configuration
DMARC Implementation
DMARC builds on SPF and DKIM by specifying what receiving servers should do with emails that fail authentication.
How DMARC Works
- You publish a DMARC policy in your DNS records
- The policy tells receiving servers how to handle emails that fail SPF or DKIM checks
- DMARC can also send you reports about emails using your domain
Setting Up DMARC
Add a TXT record with the following settings to your DNS:
Name: _dmarc.yourdomain.com
Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com
This basic policy:
- Monitors but doesn't take action on failing emails (
p=none
) - Sends aggregate reports to the specified email address
As you become more comfortable with DMARC, you can strengthen your policy:
v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@yourdomain.com
This more aggressive policy:
- Suggests that 25% of failing emails be sent to spam (
quarantine
atpct=25
) - Continues to send reports for monitoring
Eventually, you can move to a strict policy:
v=DMARC1; p=reject; rua=mailto:dmarc-reports@yourdomain.com
This policy rejects all emails that fail authentication.
Custom MX Records for From Headers
For optimal deliverability when using custom From addresses (e.g., noreply@yourdomain.com), you may need to set up custom MX records:
- Navigate to Global Settings → Domain Authentication → Advanced Settings
- Look for the "Custom From Headers" section
- SendSquared will provide MX records specific to your domain
- Add these records to your DNS settings
Adding DNS Records with Common Providers
Here's how to add these records with popular DNS providers:
GoDaddy
- Log in to your GoDaddy account
- Click My Products
- Select DNS for your domain
- Click Add to add a new record
- Select the record type (TXT for SPF/DMARC, CNAME for DKIM)
- Enter the provided hostname and value
- Save changes
Namecheap
- Log in to your Namecheap account
- Go to Domain List and click Manage next to your domain
- Select the Advanced DNS tab
- Click Add New Record
- Select the record type and enter the required information
- Save changes
Google Domains
- Log in to Google Domains
- Select your domain
- Click DNS in the left menu
- Scroll to "Custom records"
- Click Add to create a new record
- Enter the host, record type, and data
- Save
Amazon Route 53
- Log in to AWS Console
- Navigate to Route 53
- Select Hosted Zones
- Select your domain
- Click Create Record
- Choose record type and enter values
- Click Create Records
Cloudflare
- Log in to Cloudflare
- Select your domain
- Go to the DNS tab
- Click Add Record
- Select the record type and fill in the required fields
- Save
Verifying Your Configuration
After adding all required DNS records:
- Return to SendSquared and navigate to Global Settings → Domain Authentication
- Click Verify Configuration for your domain
- SendSquared will check that all records have been properly added
You can also use these external tools to verify your configuration:
Troubleshooting Common Issues
DNS Propagation Delays
DNS changes can take 24-48 hours to fully propagate. If verification fails:
- Wait at least 24 hours before troubleshooting
- Verify records were entered exactly as provided
- Check for typos or missing characters
SPF Record Limitations
SPF has a limit of 10 DNS lookups per record. If you have many email providers:
- Consolidate lookups where possible
- Consider using macro-expanded includes
- Prioritize your most important email providers
DKIM Key Rotation
DKIM keys should be rotated periodically:
- SendSquared handles key rotation automatically
- Follow any notifications about key updates
- Update your DNS records promptly when new keys are issued
Next Steps
After configuring email authentication: