SPF, DKIM and DMARC explained — and how to set them up

Updated 4 October 2026 · 6 min read · by the GotiMail team

Short answer

SPF, DKIM and DMARC are three DNS records that prove email from your domain is really from you. SPF lists the servers allowed to send for your domain, DKIM adds a cryptographic signature to every message, and DMARC tells receiving servers what to do when a message fails those checks. Gmail, Yahoo and Outlook require them for bulk senders, and without them your email is far more likely to land in spam.

SPF: who may send for your domain

SPF (Sender Policy Framework) is a TXT record on your domain listing the mail servers allowed to send email for it. A receiving server checks the sending server against that list.

You can have only one SPF record per domain. If you use several services, combine them in one record with several include: entries.

yourdomain.com  TXT  "v=spf1 include:spf.gotimail.com ~all"

DKIM: a signature on every message

DKIM (DomainKeys Identified Mail) signs each outgoing message with a private key. The matching public key is published in your DNS, so a receiving server can confirm the message was sent with your authority and was not altered on the way.

Your email provider generates the keys; you only publish the records it gives you, usually as CNAME or TXT records under a name ending in ._domainkey.

DMARC: the policy that ties them together

DMARC (Domain-based Message Authentication, Reporting and Conformance) tells receiving servers what to do with mail that claims to be from your domain but fails SPF and DKIM alignment: nothing (p=none), send to spam (p=quarantine) or refuse it (p=reject).

Start with p=none so nothing legitimate is lost while you check every service that sends for you, then tighten to quarantine and reject.

_dmarc.yourdomain.com  TXT  "v=DMARC1; p=none"

How to add the records

  1. Open the DNS settings wherever your domain is managed (for example Cloudflare, GoDaddy, Namecheap or your hosting provider).
  2. Add or update the SPF TXT record on the domain itself. Keep only one SPF record.
  3. Add the DKIM records exactly as your email provider shows them.
  4. Add a DMARC TXT record at _dmarc.yourdomain.com, starting with p=none.
  5. Wait for DNS to update — usually minutes, sometimes up to a few hours — then check the records.

How GotiMail does it for you

When you add a domain, GotiMail shows every record your domain needs, checks each one, and tells you which is missing or wrong. If your DNS is on Cloudflare, GotiMail can add the records for you after you approve it.

Frequently asked questions

Do I need all three: SPF, DKIM and DMARC?

Yes. Gmail and Yahoo require SPF and DKIM for anyone sending to their users, and DMARC as well for bulk senders. Together they are also the best protection against people spoofing your domain.

Can I have two SPF records?

No. More than one SPF record on the same name makes SPF fail. Merge them into one record with multiple include: entries.

How long do DNS changes take?

Usually a few minutes. Depending on your DNS provider and the record’s TTL, it can take up to a few hours to be seen everywhere.

Related guides

Business email, campaigns, storage and a shared support inbox — in one workspace.Try GotiMail for 7 days