SPF, DKIM and DMARC
SPF, DKIM and DMARC are three email authentication methods, each set up as a record at your domain. SPF publishes which servers may send for the domain, DKIM cryptographically signs each message, and DMARC sets the policy for mail that fails those checks and sends you reports.1 Together they make it difficult for someone else to send email that appears to come from you.
Why email authentication is no longer optional.
Two reasons, one defensive and one commercial.
The defensive reason is spoofing: fake email sent in your name. The UK's National Cyber Security Centre lists the benefits of these controls as helping to protect the people and organisations you do business with, protecting your brand and reputation, and reducing the cost of dealing with email fraud.1
The commercial reason is delivery. Since 1 February 2024, Gmail has required everyone who sends to personal Gmail accounts to have SPF or DKIM in place, and anyone sending more than 5,000 messages a day to have all three. It says messages that are not authenticated might be marked as spam or rejected.2
A small firm sending a monthly newsletter is well under that higher threshold, and Google still recommends always setting up SPF, DKIM and DMARC.2 The same records protect the newsletter and the invoices.
What SPF, DKIM and DMARC each do.
Three records, three jobs.
| RECORD | WHAT IT DOES | WHAT TO KNOW |
|---|---|---|
| SPF (Sender Policy Framework) | Publishes the servers that should be trusted to send email for your domain.1 | It must include every service that sends for you. Google says mail from third-party senders left out of the record is more likely to be marked as spam.2 |
| DKIM (Domain Keys Identified Mail) | Adds a cryptographic signature that shows a message is from your domain. The NCSC notes that DKIM has the advantage of supporting forwarded email.1 | Gmail requires a key of 1,024 bits or longer and recommends 2,048 where the domain provider supports it.2 |
| DMARC | Sets a policy for how receiving servers handle mail that fails the SPF or DKIM checks, and produces reports on how your email is being handled.1 | To pass, the domain that authenticated the message must be the same as the domain in its From line.2 |
All three are set up at your domain provider, for each domain that sends email. They are not settings in your email program.2
Authentication for one small domain.
An invented firm that sends from more places than it thought.
Example: a recruitment firm authenticates everything that sends as its domain
- The firm lists what sends email in its name: staff mailboxes, the newsletter platform and the applicant-tracking system.
- Its SPF record is written to include all three.
- DKIM signing is switched on in each service, and the keys each one supplies are added at the domain provider.
- A DMARC record is published with a policy of none and an address for reports. Gmail accepts a policy of none from bulk senders, and recommends setting up reports to identify anyone impersonating the domain.2
- The reports show a fourth sender nobody listed: the accounts package that emails invoices. It is added to SPF and given a DKIM key.
- Only when the reports show all genuine mail passing does the firm consider a stricter policy, with whoever looks after its IT.
This illustrates the approach. It is not a description of a past project.
What these three records do not do.
Five things authentication gets credited with, or confused with.
Authentication is a requirement, not a pass. Gmail also asks senders to keep reported spam below 0.3%, and ideally below 0.1%.2
They show who sent a message. Protecting it in transit is a separate measure, TLS, which the NCSC and Gmail both ask for as well.1 2
Every service that sends as your domain has to be included. Google says mail from senders missing from the SPF record is more likely to be marked as spam.2
The all-three rule starts at 5,000 messages a day to Gmail accounts. The SPF-or-DKIM rule applies to every sender.2
The wider question of whether email arrives. Authentication is one part of it. Gmail's other expectations include an easy way to unsubscribe and sending only to people who want the messages.2
Setting up SPF, DKIM and DMARC safely.
Six steps. The first is a list, not a DNS change.
- List every sender. Mailboxes, marketing platform, CRM, accounts, website forms and booking tools.
- Publish SPF and switch on DKIM for each one. If you use an email service provider, Google's advice is to verify that it authenticates your domain's email with both.2
- Add DMARC with reporting. Google recommends reports so you can monitor mail sent from your domain, or mail that only appears to be.2
- Run the NCSC's check. Its email security check service tests whether a domain is configured in line with its guidance.1
- Read the reports before tightening anything.
- Watch the spam rate. Google's Postmaster Tools show it for mail sent to Gmail users.2
The NCSC's guide is written for IT managers and systems administrators, and a wrong DNS record can stop email arriving, so involve whoever looks after your domain. For the sending side, see email marketing and email automation.
SPF, DKIM and DMARC: quick answers.
Three questions from people who have just seen a warning.
What is DMARC in simple terms?
It is an instruction you publish for other mail servers. It tells them what to do with a message that claims to be from your domain and fails the SPF and DKIM checks, and it produces reports. The NCSC says those reports help you understand how your email is being handled.1
Do I need all three if I only send a few emails?
Gmail's minimum for every sender is SPF or DKIM, and all three become a requirement above 5,000 messages a day to Gmail accounts. Google nonetheless recommends always setting up SPF, DKIM and DMARC.2 The NCSC advises protecting all of an organisation's domains, including where it uses a common cloud email provider.1
Will SPF, DKIM and DMARC stop my emails going to spam?
They remove one cause and are not the whole answer. Google says authenticated messages are less likely to be rejected or marked as spam. It also sets expectations on reported spam rates, on unsubscribing and on sending only to people who signed up.2
SOURCES
- National Cyber Security Centre, “Email security and anti-spoofing”, page 1 of the guidance (version 2.0, published 7 October 2019), read 3 December 2026.
- Gmail Help, “Email sender guidelines”, read 3 December 2026.
