Start a project

Article · Email authentication · DNS · UK domains · 13 min read

SPF, DKIM and DMARC for a UK domain

SPF, DKIM and DMARC are three DNS records with one job: they help a receiving mail server decide whether a message that claims to come from your domain was actually sent by you. They will not stop every scam that mentions your brand, and they will not make a newsletter more welcome. They will stop a lot of cheap spoofing, and they are now a practical requirement if you want mail to land in Google, Microsoft or a careful British inbox.

On this page 10 sections
  1. Three records, one purpose: prove who sent the mail
  2. SPF: one record, every legitimate sender
  3. DKIM: signing from each platform you use
  4. DMARC: none, quarantine, reject — in that order
  5. Several senders on a small UK domain
  6. Reports, alignment and the usual errors
  7. A rollout plan that does not strand mail
  8. How to check the live records
  9. Key takeaways
  10. Frequently asked questions

On a small UK domain the hard part is not the syntax. It is the inventory: the inbox you read, the form that sends you a copy, the account that invoices, the newsletter tool, the accountant’s system. Miss one sender, move DMARC to reject too early, and you strand real mail. The method below is a rollout, not a protocol lecture. I use the SPF, DKIM & DMARC Builder and the SPF, DKIM & DMARC Checker on this site when I am adding or reviewing a domain.

Three records, one purpose: prove who sent the mail

It helps to keep the three jobs separate:

A message can pass SPF and still fail DMARC, if the envelope domain and the From domain do not align. A message can pass DKIM and pass DMARC even when SPF does not, which is why a forwarding setup often depends on DKIM. You want both, and then a DMARC policy that you have earned the right to tighten.

The NCSC’s guidance on email security is a good UK-oriented companion to the RFCs when you are explaining this to a client or a registrar. The records themselves are ordinary DNS TXT records. Nothing about a .uk or .co.uk domain changes the syntax; what changes is the usual set of senders (Google Workspace or Microsoft 365, a registrar mailbox, a transactional provider, a shop).

SPF: one record, every legitimate sender

A domain should have one SPF record. Two TXT records that both start v=spf1 is a common, well-defined failure: receivers are entitled to treat that as a permanent error, and your carefully written includes will not be used. If you need to add a sender, edit the existing record.

A record is a single string, built from mechanisms. A small domain might look like this:

v=spf1 include:_spf.google.com include:spf.messaging.example ~all

That says: accept IPs that Google publishes, accept IPs that the transactional provider publishes, and soft-fail everything else (~all). -all is a hard fail. +all is “allow the world,” which makes SPF useless. ?all is a neutral result. For a rollout, ~all is the usual first step; -all is what you move to once DMARC reports, and your own tests, show that every legitimate sender is listed.

Rules that save a lot of pain:

If a provider asks you to “add an SPF record” and you already have one, they mean “add our include to the record you have.” The SPF, DKIM & DMARC Builder will lint a draft for a second v=spf1, a missing all, and some lookup-count problems; it cannot list senders you have forgotten.

DKIM: signing from each platform you use

SPF is about IPs. DKIM is about a key. Each sending platform should sign with a selector you publish:

selector._domainkey.example.co.uk.  TXT  "v=DKIM1; k=rsa; p=MIIBIjAN..."

The selector is a short name the provider chooses or lets you choose (google, s1, k1). The p= value is the public key. An empty p= is how you revoke a selector you have finished rotating away from.

What to do in practice:

If a platform cannot DKIM-sign as your domain, you have a decision: send as the provider’s domain (and be honest about it in the From header), or move that mail to a platform that can. Don’t paper over it by weakening DMARC.

DMARC: none, quarantine, reject — in that order

A DMARC record lives at _dmarc.your-domain:

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

The important tags:

The safe order is always none, then quarantine, then reject. Stay on none until the reports show only senders you recognise, or spoofing you are content to block. Move to quarantine for a period, watch support mail and the reports, then move to reject. Skipping to reject on a domain that has a forgotten invoice system is how you spend a week chasing “your email bounced.”

DMARC is not a spam filter you apply to mail you receive. It is a policy you publish about mail that claims to be from you.

Several senders on a small UK domain

A typical small UK setup is messier than a lab example. It might include:

Write the list down before you edit DNS. For each sender, record: the From addresses it uses, whether it can DKIM-sign as your domain, and the SPF include it documents. Then:

  1. Add every SPF include to the single record, and check the lookup count.
  2. Enable DKIM on each platform that can sign as you.
  3. Publish DMARC at p=none with an rua address.
  4. Stop using, or reconfigure, anything that cannot authenticate and is not worth keeping.

Shared mailboxes and “send as” arrangements are a frequent hole. If a colleague sends as hello@your-domain from a personal Gmail account, that mail will not pass SPF or DKIM for your domain, and under a reject policy it will not arrive. The fix is to send through the domain’s actual provider, not to loosen the policy.

UK-specific logistics are ordinary ones: the DNS host is often a registrar with a slow TTL, so leave time between changes; someone else may already have added a partial SPF record years ago; and .co.uk is still just a domain in DNS, not a special mail regime. If you use a .gov.uk or similar public-sector domain, there may be additional expectations — follow the guidance that applies to that estate rather than this article.

Reports, alignment and the usual errors

Aggregate DMARC reports are XML summaries, usually daily, from receivers that choose to send them. They tell you, for a period: which source IPs sent mail claiming your domain, how much passed SPF, how much passed DKIM, whether those results were aligned, and what the receiver did. They do not include the full body of each message.

Read them for surprises, not for a perfect percentage. A burst of failing mail from random IPs is often spoofing, and is evidence that a reject policy would help. Failing mail from an IP you recognise is a sender you missed. A source that passes SPF but fails alignment is often a forwarder or a provider sending as you with the wrong envelope domain.

The Email Header Analyser is the right tool for a single message: paste the headers of a received mail (the ones your client can show as “raw” or “original”) and look at Authentication-Results, Received-SPF, DKIM-Signature and From. One authentic-looking newsletter is worth more than a guess about a record.

Usual errors:

A rollout plan that does not strand mail

A sequence I am comfortable recommending to a small domain:

  1. Inventory senders, including tools that only send once a month.
  2. Publish or tidy SPF with ~all, one record, every include you need. Wait for DNS to propagate; check with a lookup from somewhere other than the registrar’s own DNS.
  3. Enable DKIM on each platform, and send a test message from each one to an inbox you control. Read the headers.
  4. Publish DMARC at p=none with an rua mailbox you monitor. Leave it there long enough to cover a billing cycle, not just a quiet weekend.
  5. Fix or retire anything the reports show that you still want to arrive.
  6. Move to p=quarantine, tell anyone who might receive your mail to look in junk folders for a week or two, and keep reading reports.
  7. Move to p=reject, then change ~all to -all in SPF if you have not already and the reports still look clean.
  8. Put a reminder in the same place you keep domain renewals, so a new tool cannot be added silently. New senders should be added the way a release is added after launch or a step is added to a launch process: as a deliberate change, not an afterthought. The habit is the same one I want in a privacy manifest: do not declare a sender, or a library, you do not actually use, and do not forget one you do.

Do not buy a “DMARC certificate” or a BIMI logo as a first step. BIMI is a later, optional overlay that depends on a sound DMARC reject policy and on the current logo and certificate requirements, which are a separate job.

How to check the live records

Before you declare the job done, and again after any DNS change:

If a test fails, fix that sender before you tighten p=. A green dashboard on a DNS host is not the same as a message that authenticates.

Key takeaways

If you want a second pair of eyes on a domain’s mail records, tell me about it.

Frequently asked questions

What is the difference between SPF, DKIM and DMARC?

SPF checks whether the sending IP is listed for the envelope domain. DKIM checks a cryptographic signature against a public key in DNS. DMARC checks that at least one of those results is aligned with the domain in the From header, and tells the receiver whether to monitor, quarantine or reject a failure.

How do I add DMARC without blocking legitimate mail?

Publish p=none with an rua address first, and leave it there until you have reports that cover every sender you care about. Fix or retire the gaps, then move to quarantine, then reject. Don’t start at reject.

Can I have more than one SPF record?

No. A domain should have a single v=spf1 TXT record. If two exist, receivers may treat SPF as a permanent error. Add a new sender by editing the existing record.

How do I include Google, Microsoft or a transactional sender?

Use the include mechanism (or the equivalent) that the provider currently documents, inside your one SPF record, and enable that provider’s DKIM for your domain. Don’t copy an include hostname from an old tutorial; look it up in the current setup guide for that product.

What does a DMARC report actually tell me?

An aggregate report is a summary, usually daily, of messages that claimed your domain: source IPs, SPF and DKIM results, alignment, and what the receiver did. It is an inventory and a warning system, not a full copy of each email.

Written by Lee Johnson. Published 10 November 2026.

All articles · Swift A–Z · Apps

Questions, or an app in mind?

Let's bring your ideas to life. Whether you're envisioning a game-changing Apple Watch app or a transformative iOS experience, I'm here to make it happen.

Start a project