Blog › SMTP and DNS

SPF, DKIM and DMARC for agency-managed sites, explained once

What each record does, what breaks when a client's IT moves DNS, and a pre-migration checklist to send them.

· 3 min read · The FormVigilant team

Agencies usually control the website and rarely control the domain's DNS. The client's IT person, their previous agency or their registrar does. That split is exactly where form notifications get lost: a DNS change made for an unrelated reason removes a record the website's email depended on, and nobody connects the two for weeks.

Here is what the three records do, in the order mail servers check them, and what you need to keep them intact.

SPF: who may send

SPF is a single TXT record on the domain, starting v=spf1, that lists the servers allowed to send mail for it. A receiving server checks the IP address that delivered the message against that list.

v=spf1 include:_spf.google.com include:spf.mtasv.net ~all

This one allows Google Workspace and Postmark. Things that go wrong:

  • Two SPF records. Adding a second v=spf1 record instead of editing the first makes SPF fail for all mail. Merge them into one.
  • Too many lookups. SPF allows at most 10 DNS lookups, counting every include: and the includes inside them. Large records with many services exceed it and fail.
  • The website's sender is missing. The client's IT adds Microsoft 365 and replaces the record, removing the provider the website's SMTP plugin uses.

SPF only checks the envelope sender, which the visitor never sees, so on its own it does not protect the From address. That is DMARC's job.

DKIM: a signature on every message

DKIM signs each outgoing message with a private key held by the provider. The matching public key is published in DNS under a selector, for example pm._domainkey.clientdomain.com or s1._domainkey.clientdomain.com, usually as a CNAME pointing at the provider or a TXT record containing the key.

DKIM survives forwarding and proves the message was not altered. It is also the record most often lost: it was added once when the SMTP provider was set up, it has an unmemorable name, and it is not obviously "email" to someone tidying DNS. When it goes, mail is still accepted by the provider and then rejected or junked at the receiving end.

Keep a note, per client, of every DKIM selector in use and which service it belongs to.

DMARC: the policy

DMARC is a TXT record at _dmarc.clientdomain.com. It tells receivers what to do when a message claims to be from the domain but neither SPF nor DKIM passes in alignment with the From address, and where to send reports.

v=DMARC1; p=none; rua=mailto:dmarc@clientdomain.com
  • p=none monitors only. Start here.
  • p=quarantine asks receivers to junk failing mail.
  • p=reject asks them to refuse it.

Alignment matters: the domain in the From header must match the domain that passed SPF or DKIM. A form that sends "from" the visitor's Gmail address will always fail DMARC, which is why the From address should be on the client's domain and the visitor should go in Reply-To.

Since February 2024, Google and Yahoo require bulk senders to have SPF, DKIM and a DMARC record, and they apply more scrutiny to unauthenticated mail from everyone. Microsoft introduced similar requirements for high-volume senders to Outlook.com in 2025. A small business form will not hit the bulk thresholds, but it is judged by the same filters, and an unauthenticated notification is much more likely to land in junk.

How to check a domain

From a terminal:

dig +short TXT clientdomain.com
dig +short TXT _dmarc.clientdomain.com
dig +short CNAME pm._domainkey.clientdomain.com

Or send a test from the website's form to a Gmail address and use Show original, which lists SPF, DKIM and DMARC results at the top. Do this after every DNS change.

The pre-migration checklist to send the client

When a client mentions a new registrar, a move to Cloudflare, a new email provider or "IT is tidying up the domain", send them this:

  1. Export or screenshot every DNS record before changing anything, including TXT and CNAME records.
  2. Keep the SPF record as a single record and add new services to it rather than replacing it.
  3. Copy every record containing _domainkey. These are email signatures; the website and other services depend on them.
  4. Copy the _dmarc record unchanged.
  5. Do not change MX records unless the mailbox provider is changing.
  6. Lower record TTLs a day before the move, and tell us the date and time of the switch.

After the move

Run a test submission on every form immediately after the switch and again the next day, when caches have expired. If you monitor forms with FormVigilant, an L4 test after the change shows the SPF, DKIM and DMARC results our mail server recorded; a failure appears as CATCH_NOT_RECEIVED with the authentication results attached, usually the morning after someone removed a DKIM record.

Find out which of your clients' forms are delivering today.