Who this is for

You run a small office. Your email is Microsoft 365 or Google Workspace. Your domain sits at GoDaddy, Bluehost, Network Solutions, or wherever the website person put it years ago. Nobody on staff does IT. You have heard that some records would stop spam that uses your name, or a customer told you your message went to junk, and you want to fix it without breaking the mail that works today.

This takes about an hour of your time, spread over a few weeks, and it costs nothing but that hour. If you would rather hand it off, the last section says what that costs too.

What the three records do

Think of each email as a letter.

SPF is the list of post offices allowed to send letters with your return address. It is one TXT record on your domain that names your mail provider. A receiver checks the server that handed over the message against that list.

DKIM is a signature inside the letter. Your mail provider signs every outgoing message with a private key and publishes the matching public key in your DNS. A receiver checks the signature. Unlike SPF, the signature survives forwarding, which is why DKIM is the record that quietly keeps most small-office mail delivering.

DMARC is the note to the receiver that says what to do when both checks fail, and where to send the daily report about who is sending as you. Without DMARC, SPF and DKIM are advice. With it, they are policy, and you get to see the results.

Since 2024, Google and Yahoo have required SPF or DKIM on every message they accept, and both plus DMARC from anyone sending in bulk. Microsoft announced the same for Outlook.com in 2025. A five-person office is not a bulk sender, but the direction is clear, and the receivers you cannot see, such as a bank's or an insurance carrier's mail gateway, are often stricter than Gmail.

Look before you touch anything

Every record here is public. You can read your own from any computer, and so can I, which is how I do free checks without ever asking for a password.

dig +short TXT yourdomain.com
dig +short TXT _dmarc.yourdomain.com
dig +short CNAME selector1._domainkey.yourdomain.com   # Microsoft 365
dig +short TXT google._domainkey.yourdomain.com        # Google Workspace
dig +short MX yourdomain.com

On a Mac, dig is already in Terminal. On Windows, use nslookup -type=TXT yourdomain.com, or paste the domain into a free lookup site such as MXToolbox.

Here is what my own domain returns today:

$ dig +short TXT stingrayio.com
"NETORGFT10275101.onmicrosoft.com"
"v=spf1 include:spf.protection.outlook.com -all"

$ dig +short CNAME selector1._domainkey.stingrayio.com
selector1-stingrayio-com._domainkey.netorgft10275101.w-v1.dkim.mail.microsoft.

$ dig +short TXT _dmarc.stingrayio.com
"v=DMARC1; p=none; rua=mailto:shawnmharris@stingrayio.com; fo=1; adkim=r; aspf=r"

Reading it: the first TXT line is Microsoft's domain verification, harmless, leave it alone. The SPF line says only Microsoft 365 may send as stingrayio.com, and anything else should fail hard. The DKIM selector points at Microsoft's signing key for my tenant. The DMARC record says: policy none, report only, and send the daily reports to me. The last three tags are defaults written out, and one of them does nothing at all. More on that below.

The order that will not break anything

Most guides go SPF, then DKIM, then DMARC, because that is the order the acronyms were invented. It is also the order most likely to put your own mail in junk, because SPF is the record where a typo or a forgotten sender does damage the same minute you save it.

I do it backwards.

0. Write down everyone who sends as you

Before any record changes, list every system that sends email with your domain in the From line. The mail provider, obviously. Then the website contact form. The invoicing tool. The newsletter service. The scanner in the back office. The practice-management or agency-management system. The scheduling tool that sends reminders. Ask everyone on staff "what sends email for us?" and write down the answers.

Every one of those needs to be either on your SPF list or sending through a provider that signs with DKIM for your domain. The ones you forget are the ones that fail later, and the failure looks like "the client never got the reminder."

1. DMARC first, in report-only mode

This is the counterintuitive step. A DMARC record with p=none changes nothing about how your mail is delivered. It only turns on reporting. Add it first and you get a week of data on who is sending as you before you touch the records that can break things.

Add a TXT record at _dmarc.yourdomain.com:

v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com

Use an address you read, or make a mailbox for it. The reports are XML attachments, one per receiving provider per day, and they are not meant for people. Several services turn them into a readable weekly email for free at small volume. Postmark runs one; there are others. If the report address is on a different domain than the one you are protecting, that other domain has to publish a one-line record saying it accepts reports for you. The service will tell you the exact line.

About the extra tags on my own record: adkim=r and aspf=r are the defaults, relaxed alignment, written out. fo=1 asks for a per-message failure report when either check fails, but it only does anything alongside a ruf= address, which I do not publish, because most large receivers stopped sending those reports years ago. Harmless. Do not copy it thinking it does something.

2. DKIM second

If your provider has already turned DKIM on, it is probably the thing keeping your mail out of junk today. Check: if the selector lookup above returned a record, signing is likely on. If it returned nothing, this is the most valuable ten minutes in the whole exercise.

Microsoft 365. In the Microsoft 365 Defender portal (security.microsoft.com), under Email & collaboration, Policies & rules, Threat policies, Email authentication settings, open DKIM and select your domain. It shows two CNAME records, selector1._domainkey and selector2._domainkey, with targets specific to your tenant. Publish both in your DNS exactly as shown. Copy, do not type. Wait until dig returns them, then come back and switch signing on. Two selectors exist so Microsoft can rotate keys without you doing anything.

If your Microsoft 365 came bundled through GoDaddy, the Defender portal is not yours to open. GoDaddy holds the admin role in that arrangement. The switch lives in GoDaddy's Email & Office dashboard, and their support will flip it if you cannot find it. The two CNAMEs are the same idea.

Google Workspace. In the Admin console, go to Apps, Google Workspace, Gmail, Authenticate email. Select the domain and generate a new record. Choose the 2048-bit key. Publish the TXT record it gives you at google._domainkey.yourdomain.com, wait for it to appear in dig, then click Start authentication.

Verify. Send a message from your office account to a free Gmail address. In Gmail, open the message, choose Show original, and read the summary at the top. You want DKIM: 'PASS' with domain yourdomain.com. That one line is the whole point of this step.

3. SPF third, and gently

Now SPF. You know every sender from step 0, and you have a week of DMARC reports confirming the list. Three rules:

  • One record. A domain with two TXT records that start with v=spf1 fails SPF everywhere, for everyone. If one exists, edit it. Never add a second.
  • Ten lookups. Each include: costs at least one DNS lookup, and the limit is ten. A small office rarely gets near it, but every tool you add is a lookup you spend.
  • Start soft. ~all tells receivers to treat unlisted senders with suspicion. -all tells them to reject. Begin with ~all. Once DMARC is enforcing, the difference matters much less, because DMARC counts a softfail as a fail anyway.

Microsoft 365:

v=spf1 include:spf.protection.outlook.com ~all

Google Workspace:

v=spf1 include:_spf.google.com ~all

Each extra sender is an include: from that vendor's documentation, placed before the all. If your website form sends through Amazon SES, for example, that is include:amazonses.com.

A better pattern for automated mail is to give it a subdomain. On a local insurance business's site I rebuilt this year, the quote form sends from mail. followed by their domain, and that subdomain has its own SPF and DKIM. Their real business mail on the main domain never shares a reputation with a form that a bot might hammer, and the main-domain SPF stays a one-line record.

4. Read the reports, then turn the policy up

After two to four weeks, the DMARC digests show every source sending as you and whether each one passed. Legitimate sources that fail are the ones from step 0 you still need to fix. Sources you do not recognize are the reason you are doing this.

When everything you own passes, change p=none to p=quarantine; pct=25. Wait a week and read the reports. Raise pct to 100. Wait again. Then p=reject. Reject means a receiver that honors DMARC drops a forged message outright, and most of the big ones do.

The timeline is weeks. Anyone who tells you it is an afternoon is skipping the reports, and the reports are the only way to know you did not just block your own scheduling tool.

The mistakes I keep finding

Last month I ran a read-only check across the 138 members of my local Chamber of Commerce. 124 had a website. Twelve of the email domains had no SPF record at all, which means anyone, anywhere, can send mail that looks like it came from them, and no receiver has been told otherwise.

This week I looked at fifteen small-business domains built by good web shops around the state. Every one had SPF. A third had no DMARC. One ran on Microsoft 365 with DKIM switched off, which is an alarm system installed and never armed.

And one mistake of my own. I wrote a proposal for a client whose SPF record read v=spf1 include:secureserver.net -all. Their mail was on Microsoft 365, so I called the record broken: wrong provider, hard fail. It was not broken. That include chains to a GoDaddy record which, after a long list of GoDaddy's own address ranges, ends with include:spf.protection.outlook.com. GoDaddy publishes exactly that for Microsoft 365 sold through GoDaddy, and the client's mail passed. The record is looser than it needs to be, since it also authorizes every GoDaddy shared mail server, but it works. I checked again before changing anything, and I was glad I did. The lesson is step 0 and the dig commands: look at what is actually there, follow every include to the end, and do not fix what passes.

What it costs

The records are free. DKIM is included with Microsoft 365 and Google Workspace. A free DMARC digest service covers a five-person office. Your cost is the hour, plus the patience to wait for the reports.

If you would rather I do it, I charge a flat $150 per domain to set all three records up, read the reports with you, and walk the policy to reject, with every change written down and the records left in your own DNS account under your own name. The free check comes first either way, and most people who get the check fix it themselves from the note. That is fine. The point is that the next forged invoice "from" your office gets dropped before a client ever sees it.