Knowledge Base

How to Configure SPF, DKIM and DMARC Records

DNS logo

This article will show you how to configure SPF, DKIM and DMARC records.

SPF, DKIM, and DMARC are email authentication records that help protect your domain from spoofing and ensure your emails reach the inbox rather than the spam folder.


SPF (Sender Policy Framework)

An SPF record tells receiving mail servers which servers are authorised to send email on behalf of your domain.

How to Add an SPF Record

  • In your DNS manager, create a new TXT record.
  • Set the name to @ (or your domain name).
  • Set the value to something like: v=spf1 include:yourmailprovider.com -all
  • Replace yourmailprovider.com with the value provided by your email provider.
  • Save the record.

Note: You should only have one SPF record per domain. If you need to authorise multiple providers, combine them into a single record.

DKIM (DomainKeys Identified Mail)

A DKIM record adds a digital signature to your outgoing emails, allowing receiving servers to verify they have not been tampered with in transit.

How to Add a DKIM Record

  • Your email provider will supply you with a DKIM key, typically in the format: selector._domainkey.yourdomain.com
  • In your DNS manager, create a new TXT record.
  • Set the name to the selector provided by your email provider (e.g. default._domainkey).
  • Set the value to the public key string provided by your email provider.
  • Save the record.

DMARC (Domain-based Message Authentication, Reporting and Conformance)

A DMARC record tells receiving mail servers what to do when an email fails SPF or DKIM checks, and where to send reports.

How to Add a DMARC Record

  • In your DNS manager, create a new TXT record.
  • Set the name to _dmarc.
  • Set the value to something like: v=DMARC1; p=none; rua=mailto:reports@example.com
  • Replace reports@example.com with an email address where you want to receive reports.
  • Save the record.

DMARC policy options:

  • p=none - monitor only, no action taken.
  • p=quarantine - suspicious emails are sent to spam.
  • p=reject - suspicious emails are rejected outright.

DNS Propagation

After adding or updating these records, allow up to 48 hours for changes to propagate across the internet. You can verify your records using a tool such as MXToolbox.


Configuring SPF, DKIM, and DMARC records is essential for protecting your domain's email reputation and ensuring reliable email delivery.


Next: if mail is still bouncing, How to Fix Email Bounceback Errors (Non-Delivery Reports) explains what the error codes mean.

Please rate this article to help us improve our Knowledge Base.

0 0