DNS records are essential for authenticating your domain’s email sending capabilities. They help in improving email deliverability and protecting your domain from being used for email spoofing. The three main types of DNS records relevant to email deliverability are:
- SPF (Sender Policy Framework)
- DKIM (DomainKeys Identified Mail)
- DMARC (Domain-based Message Authentication, Reporting, and Conformance)
Setting Up SPF Records
SPF records specify which mail servers are permitted to send email on behalf of your domain. Here’s how to set up an SPF record:
- Identify your email sending platform.
- Create an SPF record in your domain’s DNS settings. This record should include the IP addresses or hostnames of the servers allowed to send emails for your domain.
- Syntax Example:
v=spf1 include:sendinblue.com ~allv=spf1indicates the version of SPF used.include:sendinblue.comauthorizes Sendinblue’s servers to send emails on behalf of your domain.~allspecifies a soft fail for email sent from servers not listed in the SPF record. v=spf1indicates the version of SPF used.include:sendinblue.comauthorizes Sendinblue’s servers to send emails on behalf of your domain.~allspecifies a soft fail for email sent from servers not listed in the SPF record.
Implementing DKIM Records
DKIM adds a digital signature to emails sent from your domain, allowing receiving mail servers to verify that the email was indeed sent from an authorized mail server. To set up DKIM:
- Generate a DKIM key pair through your email-sending platform.
- Add a DKIM record to your domain’s DNS settings, including the public key part of your DKIM key pair.
- Ensure alignment between the email’s “From” domain and the domain in the DKIM signature.
Configuring DMARC Policies
DMARC uses SPF and DKIM to determine the authenticity of an email message. It also instructs receiving servers on what to do with emails that fail SPF and DKIM checks. To configure DMARC:
- Create a DMARC record in your domain’s DNS settings.
- Set your policy to either
none,quarantine, orreject, depending on how strictly you want to enforce SPF and DKIM checks. - Example:
v=DMARC1; p=reject; rua=mailto:report@yourdomain.comv=DMARC1indicates the DMARC version.p=rejecttells receiving servers to reject emails that fail SPF and DKIM checks.rua=mailto:report@yourdomain.comspecifies where aggregate reports of DMARC failures should be sent. v=DMARC1indicates the DMARC version.p=rejecttells receiving servers to reject emails that fail SPF and DKIM checks.rua=mailto:report@yourdomain.comspecifies where aggregate reports of DMARC failures should be sent.
Troubleshooting Tips
- Emails not being delivered? Check your SPF, DKIM, and DMARC records for errors.
- Receiving spam complaints? Ensure your DMARC policy is set to
rejectto prevent unauthorized use of your domain. - DMARC reports not received? Verify the email address in your DMARC record is correct and capable of receiving messages.
Frequently Asked Questions
Can I use multiple email-sending platforms?
- Yes, but ensure all platforms are included in your SPF record and have their DKIM keys added to your DNS settings.
What does ~all and -all mean in SPF records?
~allindicates a soft fail, suggesting that emails from unlisted servers should be treated with suspicion.-allindicates a hard fail, recommending that emails from unlisted servers be rejected.
How often should I update these records?
- Whenever you change your email sending platform or if you add additional platforms.