Skip to main content

SPF, DKIM and DMARC: the three DNS records that make it harder to send email as your business

Publish SPF and DKIM for every service that sends your email, then add DMARC in monitoring mode and tighten it in stages as the reports show your real email passing.

KBY Small Business 8 min read Sources checked 23 November 2026
A white envelope on a blue folder beside a lined notepad and a marker pen on a wooden desk
Photo: RDNE Stock project on Pexels

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.

A criminal can send an email that claims to come from your business's address, and three text records make that much harder: SPF, DKIM and DMARC. All three sit in your domain's public , the directory that tells other mail systems how to treat email claiming to come from you. The route is to set up SPF and DKIM for every service that sends email from your domain, publish a DMARC record that only asks for reports, and then tighten DMARC in stages once those reports show your genuine email passing. The NCSC's guidance on email security and anti-spoofing says you should protect all of your organisation's domains this way, including when you use a cloud email provider such as Google or Microsoft.

The NCSC lists the benefits as making it difficult for criminals to spoof your email address, which helps protect the people and organisations you do business with, and helping to protect your brand and reputation. Its phishing guidance adds that your own genuine emails are more likely to reach recipients' inboxes rather than being filtered out as spam. The records cover email that claims to come from your domains, not scam email sent from other people's.

What the three records actually check

The NCSC's summary of the three:

  • SPF (Sender Policy Framework) publishes the IP addresses that should be trusted to send email for your domain. A receiving mail service checks whether the server that sent the message is on that list.
  • DKIM (DomainKeys Identified Mail) adds a cryptographic signature to the email you send. The receiving service checks it against a public key published in your DNS, and a successful check shows the message hasn't been tampered with on the way. The NCSC calls DKIM a stronger authentication method than SPF, and says it helps recipients validate email that has passed through a relay on the way.
  • DMARC (Domain-based Message Authentication, Reporting and Conformance) lets you set a policy for how receiving servers should handle email that doesn't pass, and asks them to send you reports on the email they see from your domain.

The detail that matters is how DMARC decides pass or fail. Under the current DMARC standard, RFC 9989, a message passes DMARC when SPF or DKIM passes and the domain that passed is aligned with the domain in the From address the recipient sees. Google's email sender guidelines put it the same way: messages must be authenticated by SPF or DKIM, or both, and the authenticating domain must be the domain in the From header. So a message fails DMARC only when neither an aligned SPF result nor an aligned DKIM result passes.

List every service that sends email in your name

Your records can only vouch for senders you know about, so the first job is a list. The NCSC's page on creating an SPF record recommends asking every part of the organisation whether it uses any third party to send email. In a small business, the places to ask about include:

  • your main mailbox provider, such as or Google Workspace;
  • a newsletter or marketing tool;
  • accounting or invoicing software that emails invoices from your address;
  • a booking system, online shop or website contact form;
  • a help desk tool.

The NCSC singles out mass marketing services: if your staff use one, make sure it sends authenticated mail, with its details added to SPF and DKIM set up, so your legitimate marketing email is less likely to end up as spam. Google's guidelines say the same from the receiving side: if third-party senders aren't in your SPF record, their messages are more likely to be marked as spam, and if you use an email service provider you should check that it authenticates your domain's email with SPF and DKIM.

Window envelopes, a pen, coins and a green calculator on a marble desk
Photo: Jason Deines on Pexels

Writing the SPF record

An SPF record is a record in your domain's public DNS. The NCSC's example for an organisation that sends through Google is:

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

Each sending service gives you its own value to add, often as an include:. The NCSC is clear that its examples can't simply be copied into your DNS: check with each supplier for the exact value, which it suggests finding by searching for the service's name and how to set up its SPF record.

The same NCSC page lists three things that trip people up:

  1. Ten DNS lookups. SPF limits the number of domain lookups a receiving server makes to 10. Each include: can contain further lookups of its own, so a few cloud services together can breach the limit.
  2. 450 bytes. The record should be 450 characters or fewer, spaces included.
  3. Spaces. SPF is very sensitive to white space, and a missing space between terms is one of the most common errors. The NCSC suggests leaving a draft for a few hours and checking it again, or asking a colleague to check it, before you publish.

If you hit the size or lookup limit, the NCSC suggests giving each third-party sender its own subdomain, such as one for newsletters, because each subdomain has its own limits.

DKIM, signed with your own domain

With a cloud email service, the NCSC's DKIM guidance says setup is automated to some extent: look for a DKIM option in the admin panel or ask the provider. The record you publish is named with a selector followed by ._domainkey. and your domain, and the provider tells you what to put in it.

Check which domain does the signing. The NCSC notes that a new system is commonly set up by default to sign with the provider's own domain, for example onmicrosoft.com. If your From address uses your domain and the signature uses the provider's, DKIM alignment fails, so that signature can't give you a DMARC pass. Make sure each service signs with your domain.

Two smaller points from the same page. Anything that changes a message after it is signed, such as an outbound scanning service adding a disclaimer line, breaks the signature, so disclaimers need adding before signing. And the NCSC suggests rotating DKIM keys about every 12 months, keeping the old record live for a few days after the change so DNS has time to update. Google adds that sending to personal Gmail accounts needs a DKIM key of 1024 bits or longer, and recommends 2048 bits where your provider supports it.

A wax seal stamp lying beside its pressed seal on a sheet of handmade paper
Photo: Anna Tarazevich on Pexels

Tightening DMARC in three steps

The NCSC's recommended implementation plan moves through three DMARC policies in turn. Each change is an edit to one TXT record, named _dmarc followed by your domain, which is also how you step back if something goes wrong: put the previous policy back.

Watch first: a policy of none

The NCSC's page on a DMARC policy of none gives a starting record like this, with your own domain and reporting address:

v=DMARC1;p=none;rua=mailto:dmarc-reports@yourdomain.co.uk

A policy of none doesn't affect the delivery of your email. The rua address receives aggregate reports, which the NCSC says start arriving from major email providers within 24 hours and show where email from your domain comes from and whether it passed or failed SPF and DKIM. The address can be one given by a reporting tool, or a mailbox you set up for the purpose.

The reports are a lot of raw data, and the NCSC's page on choosing an anti-spoofing management tool recommends using one of the open source or commercial tools that make sense of it; most will tell you whether your DMARC, SPF and DKIM settings are correct. That page still describes the NCSC's own Mail Check service, but the NCSC retired Mail Check on 31 March 2026. It now recommends a commercial external attack surface management product, and subscribing to its Check your cyber security service, which checks your email domain for anti-spoofing and for email privacy in transit.

Use this stage to find the senders you missed and fix their SPF and DKIM.

Then quarantine

Once SPF and DKIM are set up correctly and every known legitimate sender is in your records, the NCSC says to move to quarantine. Email that fails then goes to the recipient's spam or junk folder, where the recipient has one, so it can still be recovered. The record becomes:

v=DMARC1;p=quarantine;rua=mailto:dmarc-reports@yourdomain.co.uk

The NCSC says many organisations report moving on from none after about 6 to 8 weeks. Before the change, tell whoever runs your newsletters and ask them to warn you about large mailings, and afterwards watch the reports for at least 4 weeks to make sure genuine email isn't being quarantined. If you lose confidence, go back to none and try again later.

The NCSC's pages, last reviewed in 2019, suggest applying each new policy to a small percentage of email first with a pct tag. RFC 9989 removed that tag, saying it was usually not applied accurately unless the value was 0 or 100. It adds a testing flag, t=y, which asks receivers to apply the policy one level below the one you set, so quarantine is treated as none and reject as quarantine. Either way, the reports are what tell you whether genuine email is being caught.

Reject, with care

The last step, a policy of reject, asks receiving servers to refuse email that fails DMARC. The NCSC calls reject on all your domains the best way to prevent spoofing of your email, says many organisations get there from quarantine after about 3 months, and recommends watching the reports closely for at least two weeks afterwards. If problems appear, go back to quarantine until you're ready.

RFC 9989 adds two cautions the NCSC's older pages don't cover:

  • DKIM becomes essential. Forwarding addresses and role-based aliases relay your email from their own servers, so it will most likely fail SPF, while DKIM signatures generally survive. The standard says a domain publishing reject must not rely on SPF alone and must apply valid DKIM signatures.
  • Mailing lists. If your staff post to email discussion lists on the internet, reject can cause significant problems for those lists, and the standard says such domains should not publish reject. A domain that wants reject anyway should first run none for at least a month and quarantine for as long again, compare the reports, and tell staff that taking part in mailing lists may be hindered.

What Gmail asks of you

Google's email sender guidelines set a minimum for everyone who sends to Gmail accounts: SPF or DKIM for your sending domains. If you send more than 5,000 messages a day to Gmail accounts, the bar is higher: SPF and DKIM, plus DMARC (a policy of none is enough), with the From domain aligned with either the SPF or the DKIM domain.

Google says messages that aren't authenticated may be marked as spam or rejected, and recommends that every sender sets up SPF, DKIM and DMARC whatever its volume, with DMARC reports so you can see what is sending email in your name.

Common questions

Will setting up DMARC stop our own emails being delivered?
A DMARC policy of none only asks for reports and doesn't affect delivery. Failing email is sent to spam or refused only once you move to quarantine or reject, which the NCSC says to do in stages, watching the reports, and stepping back to the previous policy if genuine email is caught.
Do we need all three if we only send a little email?
Google requires SPF or DKIM from everyone sending to Gmail accounts, and all three only from senders of more than 5,000 messages a day. It still recommends SPF, DKIM and DMARC for every sender, and the NCSC says to protect all of your domains.
Who makes these changes?
Whoever manages your domain's public DNS, since all three are DNS records. Each email service you use supplies the exact SPF and DKIM values; the NCSC says to check with each supplier rather than copying an example.

Sources

Every requirement, price and figure in this guide comes from these pages, read on 23 November 2026. Schemes, prices and products change: check the source before you rely on one.

  1. Email security and anti-spoofing, Version 2.0, reviewed 7 October 2019 (NCSC)
  2. Recommended implementation plan (NCSC)
  3. 1. Choose an anti-spoofing management tool (NCSC)
  4. Create and iterate an SPF record (NCSC)
  5. Create and manage a DKIM record (NCSC)
  6. Implement a DMARC policy of 'none' (NCSC)
  7. 4. Mark spoof emails as spam (NCSC)
  8. 5. Reject spoof emails (NCSC)
  9. NCSC to retire Web Check and Mail Check, Published 6 November 2025 (NCSC)
  10. Phishing attacks: defending your organisation (NCSC)
  11. RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC), May 2026 (IETF)
  12. Email sender guidelines (Google (Gmail Help))

Spotted something wrong or out of date? Tell us and we will correct it.

About this page

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Keep reading

More small business guides

All small business guides

Recommended reading

Share this guideXLinkedInFacebookEmail

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

All small business guides

The KBY Brief

A short email about twice a week for IT teams: new runbooks, configuration traps and fixes, and the Microsoft and Apple deadlines coming up.