Skip to content

How to set up SPF, DKIM and DMARC for your business email

By Ash, Founder, HosteazePublished 5 min read

Add three DNS records in this order. First an SPF record listing who can send email for your domain, then a DKIM record your email provider generates, then, about 48 hours later, a DMARC record starting at p=none. Watch the DMARC reports for a few weeks before tightening the policy to quarantine.

Hands typing on a keyboard as email envelopes fly out
Credit: geralt via Pixabay

If your invoices and quotes keep ending up in clients' spam folders, missing email authentication is the most likely reason. Since 2024 Gmail and Yahoo have checked for it on every message, and from November 2025 Gmail has been rejecting more mail that fails. The fix is three DNS records, and the order you add them in matters.

Brass letterbox on a dark door labelled "No junk mail"
Credit: cattu via Pixabay

What do SPF, DKIM and DMARC actually do?

Diagram of how SPF, DKIM and DMARC work together when an email is received, from your mail server through the recipient's checks to inbox, spam, block or a report
Credit: Hosteaze

Each one answers a different question the receiving mail server asks:

RecordThe question it answersWhat it looks like
SPFIs this server allowed to send email for this domain?A TXT record listing your email services
DKIMWas this email really sent by the domain, and unchanged on the way?A public key in DNS that matches a signature on each email
DMARCIf SPF or DKIM fails, what should I do, and who do I tell?A TXT record at _dmarc.yourdomain.com with your policy

SPF and DKIM prove the email is genuine. DMARC tells receivers how strict to be and sends you reports, so you can see who is sending email using your name.

Before you start: list everything that sends email as you

This is the step people skip, and it's why their DMARC setup later blocks their own invoices. Write down every service that sends email from your domain:

Each of these needs to be covered by SPF, DKIM or ideally both. Most of them publish the exact include value or DKIM record in their help pages.

Step 1: Add one SPF record

Watch the 10-lookup limit. SPF allows at most 10 DNS lookups. Every include:, a, mx, exists and redirect counts, and so do the includes inside them. Go over and SPF fails for every email with a "permerror". If you use lots of services, use DKIM for some of them instead of adding more includes.

-all or ~all? Microsoft recommends -all (hard fail) once DKIM and DMARC are in place, because DMARC can then act on messages that fail SPF. Google's own examples use ~all. Either works with DMARC; we'd use ~all while you're still finding all your senders, then move to -all.

Step 2: Turn on DKIM

DKIM keys are generated by your email provider, so you copy their record into your DNS rather than writing your own.

Google Workspace

Microsoft 365

Do the same for any other service on your list that offers DKIM (most newsletter and invoicing tools do, usually as a "domain authentication" setting).

Step 3: Wait 48 hours, then add DMARC at p=none

Google recommends allowing 48 hours after SPF and DKIM before adding DMARC, so the first reports reflect your finished setup.

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

p=none means "don't block anything, just report". It's the minimum Gmail requires from bulk senders and the safe starting point for everyone.

Step 4: Read the reports, then tighten the policy

DMARC reports are XML files, which are hard to read on their own. A free report viewer (several DMARC services offer one) turns them into a list of every server sending as your domain and whether it passed.

v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@yourdomain.com

How do I check it's all working?

Send an email from your domain to a Gmail address, open it, and choose Show original from the three-dot menu. You should see SPF: PASS, DKIM: PASS and DMARC: PASS. If any fail, the details on that page show which domain or record was checked, which usually points straight at the problem.

Common mistakes we see

Frequently asked questions

Do I need all three, or is SPF enough?

Set up all three. Gmail requires every sender to have at least SPF or DKIM, and anyone sending 5,000 or more emails a day to Gmail needs SPF, DKIM and DMARC. Even below that volume, SPF alone is easy to spoof and often isn't enough to keep you out of spam.

How long do the records take to work?

Most DNS changes are visible within an hour, though they can take up to 48 hours depending on the record's TTL. Google suggests waiting 48 hours after SPF and DKIM before adding DMARC.

Can I have two SPF records?

No. A domain must have exactly one SPF record. If you use several services, combine them into one record with multiple include statements.

Will DMARC p=reject block my own emails?

It can, if a service you use isn't covered by SPF or DKIM. That's why you start at p=none and read the reports first.

Sources

  1. Microsoft, Set up SPF to identify valid email sources
  2. Google Workspace, Set up DMARC
  3. RFC 7208, Sender Policy Framework
  4. RFC 7489, DMARC
  5. Red Sift, Gmail's enforcement ramps up
A weathered parking meter whose dial reads Time Expired, the moment a domain stops working if nobody renews it.QuestionWhat happens when a domain expires?When a domain expires, it soon stops working, so your website and email go down, although .uk domains keep running for the first 30 days. You can usually still renew it during a grace period. After that comes a redemption period, when recovery is still possible but slower, and finally the name is released for anyone to register.Email and domains · 18 November 2026Rows of identical letterboxes along a wall, each one getting its own copy of the post, the way a distribution list delivers email.QuestionShared mailbox vs distribution list, which should I use?Use a shared mailbox when a team needs to work from one inbox, such as info@ or support@, so everyone sees the same messages and replies. Use a distribution list when you just want an email copied to several people's own inboxes, such as all-staff@. Shared mailboxes suit customer enquiries. Distribution lists suit announcements.Email and domains · 16 November 2026A brick footpath through a park that splits into two routes, like the choice between Microsoft 365 and Google Workspace.ComparisonMicrosoft 365 vs Google Workspace for small businessBoth give you professional email on your own domain, cloud storage and video calls, and both cap their business plans at 300 users. Pick Microsoft 365 if your team relies on desktop Word, Excel and Outlook. Pick Google Workspace if you work mostly in a browser and collaborate on shared documents. Email quality is a tie.Email and domains · 14 November 2026A wall of numbered wooden post office boxes, where mail waits on site until its owner collects it.QuestionIMAP vs POP3, which should I use?Use IMAP. It keeps your email on the server and syncs it, so your phone, laptop and webmail all show the same inbox, folders and read messages. POP3 downloads messages to one device and usually deletes them from the server, which made sense when storage was scarce. Today it mostly causes lost emails and confusion.Email and domains · 12 November 2026Young seedlings growing in a black plastic tray, a reminder that a new domain's reputation has to be grown slowly.QuestionHow to warm up a new email domainWarming up a new email domain means building a good sending reputation before you send in bulk. Set up SPF, DKIM and DMARC first. Then start with small, steady sends to people who expect your email, increase volume gradually, and watch your spam complaint rate, keeping it well under Google's 0.3% limit.Email and domains · 10 November 2026

Want email on your own domain?

Hosteaze hosting plans let you set up mailboxes on your own domain. See what each plan includes.

See hosting plans