SPF, DKIM and DMARC explained for your own domain

If mail from your domain lands in spam or gets rejected, these three DNS records are usually the reason. Here is what each one does in plain English.

Last updated 2026-10-19

Why receiving servers check them

Anyone can type any From address into an email. SPF, DKIM and DMARC let the receiving server check that a message claiming to be from your domain really came from a server you approved. Large mailbox providers now expect them from anyone who sends regularly.

SPF: which servers may send for you

SPF is one TXT record on your root domain that lists the servers allowed to send mail for it. It starts with v=spf1 and ends with a rule such as ~all (soft fail) or -all (hard fail).

A domain must have only one SPF record. If you already have one for another service, add the new include to it rather than creating a second record, or both stop working.

Type:  TXT
Name:  @  (your root domain)
Value: v=spf1 include:<your mail provider> ~all

DKIM: a signature on every message

DKIM adds a cryptographic signature to each message. You publish the public key as a TXT record under a selector, such as selector._domainkey.yourdomain.com, and receiving servers use it to check the message was not changed on the way.

In EmailGang, Generate DKIM key in the dashboard shows the exact TXT value to publish under dkim._domainkey.

DMARC: what to do when checks fail

DMARC is a TXT record named _dmarc that tells receivers what to do with mail that fails SPF and DKIM alignment, and where to send reports. Start with p=none to monitor, then move to quarantine or reject once you are sure all your real mail passes.

Type:  TXT
Name:  _dmarc
Value: v=DMARC1; p=none;

Common mistakes

  • Two SPF records on the same domain.
  • Pasting the DKIM value with extra spaces or quotes split in the wrong place.
  • Jumping straight to p=reject before checking that every service that sends as you is covered.
  • Sending from an address on a domain that has none of these records.
  • Adding the records inside the mail service instead of at your DNS host. They must be published where your domain DNS is managed.

How to check your records

Send a message to an inbox you control at a large provider, open the original or raw message and look for spf=pass, dkim=pass and dmarc=pass in the Authentication-Results header. DNS changes can take a while to spread, so check again later if a record is missing.

For the full setup on EmailGang, from adding a domain to creating [email protected], see the custom domain guide. To send from a website, see the SMTP guide.

Frequently asked questions

Do I need all three?
For reliable delivery, yes. SPF and DKIM prove the mail is yours; DMARC tells receivers how to treat mail that fails and lets you see reports.
Will these records affect my website?
No. They are TXT records for mail only. Keep your existing website records as they are.
What DMARC policy should I start with?
Start with p=none to monitor. Tighten it to quarantine or reject only after your real mail consistently passes.

Ready to try it?

The Free plan includes 1 clone, with no card needed to start. See pricing for paid plans.

Add your domain

More guides