SPF DKIM and DMARC: A Step by Step Setup Guide

Spread the love

SPF DKIM and DMARC are three DNS-based checks that prove an email really comes from your domain. Together they form modern email authentication, and each one answers a different question. This guide explains what an SPF record, a DKIM selector and a DMARC policy do, then shows how to set them up in a safe order. Our guide to email marketing for small business lists the Gmail and Outlook rules in brief. This article is also the hands-on DNS companion to it.

Quick answer: To set up SPF DKIM and DMARC, add an SPF record that lists who may send for your domain, turn on DKIM signing with a key from your sending service, wait at least 48 hours, then publish a DMARC record that starts at p=none with a reporting address. Read the reports for about a week, then tighten the policy step by step. Because rules change, the ones below are dated November 2026.

What are SPF DKIM and DMARC?

SPF DKIM and DMARC work as a team, and no one of them is enough alone. Together, then, they give you email authentication that receivers can check. First, the table shows the job of each. A quick way to remember SPF DKIM and DMARC is this: SPF lists senders, DKIM signs messages and DMARC decides what happens next.

CheckQuestion it answersWhere it lives

|—|—|—|

SPFIs this server allowed to send mail for the domain?A TXT record on your domain
DKIMWas the message signed by the domain and left unchanged?A TXT record at selector._domainkey on your domain
DMARCWhat should the receiver do if SPF and DKIM do not line up, and who gets the reports?A TXT record at _dmarc on your domain

Google's Workspace help explains the idea this way, in its guides to SPF setup, DKIM setup and DMARC setup. In short, SPF is a record that lists the servers allowed to send email for your domain. DKIM uses a key pair: the public key sits in DNS, and the private key stays on the mail server that signs each outgoing message. Finally, DMARC tells receiving servers what to do with messages that fail the checks, and it sends you reports.

Why does email authentication matter now?

Mailbox providers now require it from larger senders, but they recommend it for everyone. Gmail's sender guidelines, effective 1 February 2024, first ask all senders to set up SPF or DKIM. Next, senders of 5,000 or more messages a day to Gmail accounts need SPF, DKIM and DMARC, plus one-click unsubscribe for marketing mail. Google also says to keep the spam rate in Postmaster Tools below 0.3%, and it advises staying below 0.10%.

Similarly, Yahoo's sender guidance asks bulk senders to implement SPF and DKIM, publish a DMARC policy of at least p=none, and keep the spam rate below 0.3%. Meanwhile, Microsoft announced that domains sending more than 5,000 emails a day to Outlook.com must pass SPF, DKIM and DMARC from 5 May 2025. Non-compliant mail goes to Junk first, and Microsoft said rejection would follow later, with the date to be announced.

Even if you send far fewer emails, email authentication protects your brand. Without it, anyone can send mail that pretends to come from you, so receivers may treat your real mail with suspicion. Therefore, set up SPF DKIM and DMARC, whatever your volume.

How do you set up an SPF record?

An SPF record is one TXT line on your domain. Follow these steps:

  1. List every sender. For example, include your mailbox provider, newsletter tool, website forms, CRM and invoicing software.
  2. Find each sender's include value. Each service publishes one in its help pages, so look there first.
  3. Write one record. Then start with v=spf1, add an include for each sender, and end with an all mechanism.
  4. Publish it. Add a TXT record at the root of your domain, shown as @ in many DNS panels.
  5. Wait and then test. Google says an SPF record can take up to 48 hours to start working.

For example, Google's sample for Google Workspace reads v=spf1 include:_spf.google.com ~all. The ~all part tells receivers to treat mail from unlisted servers as suspicious. Google also recommends ~all. In the underlying standard, RFC 7208, a minus sign means fail, a tilde means softfail, a question mark means neutral and a plus sign means pass.

Two rules cause most SPF record failures:

  • One record only. RFC 7208 says a domain may publish only one SPF record, so merge senders into one line. When more than one valid record exists, the result is a permanent error.
  • Ten lookups at most. The same standard also limits the terms that trigger a DNS lookup, such as include, a, mx, ptr, exists and redirect, to ten. Go over, and the result is also a permanent error.

Because every service adds terms, you may hit the limit. In that case, remove senders you no longer use before you consider anything more complex.

Brass and red padlocks with keys, a simple picture of email authentication locking down who can send as you
Padlocks: authentication decides who may send as your domain. Photo: Mx. Granger, CC0, via Wikimedia Commons, resized

How do you set up DKIM and choose a DKIM selector?

First, a DKIM selector is a short label that tells receivers which public key to fetch. The record name is the selector, then ._domainkey, then your domain. Google's default selector for Workspace is google, but you can choose another if that one is taken.

Here is the usual flow, based on Google's instructions:

  1. Generate the key in your sending service. Choose 2048 bits if your DNS provider supports it, because longer keys are more secure. Also, Google says Gmail needs at least 1024 bits for personal accounts.
  2. Add a TXT record at the selector name, with a value that starts v=DKIM1; k=rsa; p= and then your key.
  3. Wait for DNS. Google says it can take up to 48 hours, so be patient.
  4. Turn signing on in the service only after the record is live.
  5. Verify. Send a message to a Gmail address and open the message headers. Then look for DKIM=pass in the Authentication-Results line. Google also notes that you cannot verify by emailing yourself.

Each service that sends for your domain needs its own key and its own DKIM selector, so repeat these steps for your newsletter tool and any other sender. Your provider's instructions may use slightly different record types, so follow them exactly. Most email tools, including the ones in our guide to Mailchimp alternatives, publish their own steps.

How do you choose a DMARC policy?

A DMARC policy is the p tag in your record, and it has three values. According to Google:

  • none: deliver the message and log it in a daily report.
  • quarantine: send the message to the recipient's spam folder.
  • reject: reject the message, usually with a bounce.

Also, the record lives at _dmarc on your domain. A safe starter reads v=DMARC1; p=none; rua=mailto:[email protected], so replace the example with your own domain and a dedicated mailbox for reports. Google advises using a dedicated mailbox, group or third-party service for reports, because volume can be high. It also notes that Gmail does not support the ruf tag.

Google's recommended DMARC rollout has three stages:

  1. Set up SPF and DKIM at least 48 hours earlier, then publish p=none for one week and read the reports daily.
  2. Move to quarantine for a small share of messages with the pct tag, for example pct=5. Watch for a week or more, then raise the percentage until it reaches 100.
  3. Move to reject if you need full enforcement, and take care because failing messages never arrive.

Above all, never jump straight to a reject DMARC policy. A forgotten sender, such as an old invoicing tool, would then lose its mail.

What does DMARC alignment mean?

Alignment compares the domain in the visible From address with the domain that SPF or DKIM authenticated. Google states that to pass DMARC, a message must pass SPF with SPF alignment, or DKIM with DKIM alignment. However, only one is needed.

Relaxed alignment is the default, so most small senders can keep it, and Google says it usually gives enough protection. But strict alignment can send legitimate mail from subdomains to spam. As a result, most small senders should leave the adkim and aspf tags alone. If a service sends mail on your behalf with its own domain, ask it to sign with your domain so DKIM aligns.

What should you check before you change your DNS?

Before you publish SPF DKIM and DMARC, take five minutes to prepare, because DNS errors can stop mail and break email authentication.

  • Copy your existing DNS records to a safe note before you edit.
  • First, list every tool that sends email as you, including forms, billing and support desks.
  • Check whether you already have an SPF record, so you edit rather than duplicate it.
  • Note the DKIM selector each service uses, so keys do not clash.
  • Next, decide who reads DMARC reports and how often.
  • Also make the changes outside your busiest sending hours.

If you run automations, see our guides to email automation and the CRM for small business, because both can send mail on your behalf.

What are the most common mistakes?

MistakeWhat happensFix

|—|—|—|

Two SPF recordsSPF returns a permanent errorMerge them, then publish one record
More than ten lookupsSPF returns a permanent errorRemove unused senders, then retest
DKIM key in DNS but signing is offMessages go out unsignedTurn signing on after DNS is live
DMARC at reject on day oneLegitimate mail bouncesStart at none, then step up
Reports sent to a personal inboxInbox fills with XMLUse a dedicated mailbox, because volume can be high
Forgotten senderMail from that tool failsInventory senders first

How do you read the results?

DMARC aggregate reports arrive as data files, so many people use a free viewer or a reporting service to read them. Next, look for three things: legitimate senders that fail, unknown senders that pass, and sudden changes. Google says one week of reports usually contains data from all your mail streams.

Also watch your spam rate in Google Postmaster Tools. If it climbs, then review your list and your content, not only your DNS. This is general information about email setup, not legal or security advice for your business.

A quick SPF DKIM and DMARC checklist

  • One SPF record, under ten lookups.
  • A DKIM selector noted for every sender.
  • DKIM on for every sending service, 2048 bits where possible.
  • A DMARC policy at p=none with a reporting address.
  • Reports read weekly.
  • Policy tightened in stages.
  • Unsubscribe links and spam rate checked.

Need help with SPF DKIM and DMARC?

Develop Marketing helps businesses with social media, AI content, SEO, AEO and GEO, WordPress websites and advertising. If you would like help with your email setup, see our services page (in Thai) or contact us.

Frequently asked questions

Do I need SPF DKIM and DMARC if I send only a few emails?

Yes, because Gmail's extra rules start at 5,000 messages a day, but Google asks all senders to set up SPF or DKIM, and authentication protects your domain from imitation.

Which is more important, SPF or DKIM?

They do different jobs, so set up both. Gmail requires at least one for all senders, but bulk senders need both plus DMARC.

Can I use more than one SPF record?

No. RFC 7208 says a domain may publish only one SPF record, so merge all senders into a single line.

How long does it take for the records to work?

Google says SPF and DKIM can take up to 48 hours to start working, and it advises waiting at least 48 hours before you add DMARC.

Will DMARC stop my emails reaching the inbox?

Not at p=none, because that setting only reports. A stricter DMARC policy can send failing messages to spam or reject them, which is why a staged rollout matters.

Final thoughts

SPF DKIM and DMARC are not hard once you take them in order. List your senders, publish one SPF record, turn on DKIM for each service, then start DMARC at p=none and read the reports. Then, after a week or two, tighten the policy in small steps. Keep a note of every change, and recheck the records when you add a new tool. Good email authentication protects your name, so real messages reach real people.

Related Posts

Sell on Etsy from Thailand: Setup, Payoneer and Fees

Spread the love

How to sell on Etsy from Thailand as of November 2026: shop setup, Etsy Payments with Payoneer, the layers of seller fees and Offsite Ads.

YouTube Demonetization: Reasons, Appeals and How to Recover

Spread the love

YouTube demonetization as of November 2026: the difference between video and channel level, how appeals work, and which policies cause most problems.

You Missed

Ao Luek to Phi Phi: Road, Pier and Ferry Times from Krabi

Ao Luek to Phi Phi: Road, Pier and Ferry Times from Krabi

Susan Hoi Shell Cemetery: Fees, Low Tide and the Fossil Slabs of Krabi

Susan Hoi Shell Cemetery: Fees, Low Tide and the Fossil Slabs of Krabi

Thailand Digital Nomad Tax: The 180-Day Rule and Foreign Income

Thailand Digital Nomad Tax: The 180-Day Rule and Foreign Income

Best Beaches in Hua Hin: Khao Takiab, Suan Son Pradipat and Sai Noi

Best Beaches in Hua Hin: Khao Takiab, Suan Son Pradipat and Sai Noi

Khao Mok Gai: Thai Chicken Biryani, Green Sauce and Halal Tips

Khao Mok Gai: Thai Chicken Biryani, Green Sauce and Halal Tips

Thailand in November: Weather, Festivals and Which Coast to Pick

Thailand in November: Weather, Festivals and Which Coast to Pick