tdesk.ukAll articlesHome

SPF, DKIM and DMARC Explained: A Plain-English Guide to Email Authentication

Updated 16 November 2026

If your emails keep landing in spam, or someone has been sending messages that pretend to come from your domain, the fix usually lies in three DNS records: SPF, DKIM and DMARC. They sound technical, but the ideas behind them are simple. This guide explains what each one does, how they work together, and how to set them up without breaking your mail.

Why email needs authentication at all

Email was designed decades ago, when nobody expected strangers to abuse it. The basic protocol lets any server put any address in the From line. That is why spoofing and phishing are so easy.

Receiving mail servers now protect their users by asking a few questions about every message. Is this server allowed to send for the domain? Has the message been tampered with? What does the domain owner want done if the checks fail? SPF, DKIM and DMARC answer those questions, and all three are published in your domain's DNS.

Without them, your genuine mail looks no different from a forgery, so it is more likely to be filtered. With them, you give receiving servers a reason to trust you.

RecordWhere it lives in DNSThe question it answers
SPFA TXT record on the domain itselfWhich servers may send mail for this domain?
DKIMA TXT record at selector._domainkey.yourdomainWas this message signed by the domain, and is it unchanged?
DMARCA TXT record at _dmarc.yourdomainDo the checks line up with the From address, and what should happen if they don't?

SPF: who is allowed to send

Sender Policy Framework is a list of the servers permitted to send email using your domain. A typical record looks something like this:

v=spf1 mx include:_spf.example-mailer.com ~all

That says: the servers in my MX records may send, so may the servers listed by my newsletter provider, and anything else should be treated with suspicion. The ending matters. ~all is a soft fail (be wary), while -all is a hard fail (reject).

Two rules catch people out. First, a domain should have only one SPF record; if you need to add a sender, edit the existing record rather than creating a second. Second, SPF allows a maximum of ten DNS lookups, and every include can use several. Pile on too many services and SPF stops working altogether.

DKIM: a signature that travels with the message

DomainKeys Identified Mail adds a digital signature to each outgoing email. The sending server signs the message with a private key, and publishes the matching public key in DNS under a name called a selector. The receiving server fetches that key and checks the signature.

If the signature verifies, the receiver knows two things: the message really was sent with your domain's authority, and its signed content hasn't been altered on the way. Unlike SPF, DKIM usually survives forwarding, which makes it the more robust of the two.

Each service that sends as your domain should sign with its own DKIM key. Your host signs your mailbox mail; your newsletter platform or invoicing tool will give you its own record to publish.

DMARC: the policy that ties it together

SPF and DKIM on their own have a gap: they can pass for a domain that isn't the one shown in the From line. DMARC closes it by requiring alignment, meaning the domain that passed SPF or DKIM must match the visible From address.

DMARC also lets you tell receivers what to do with failures, and ask them to send you reports. A cautious starting record looks like this:

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

The p= tag is the policy. none means monitor only, quarantine means send failures to spam, and reject means refuse them outright.

A sensible order for setting it all up

  1. List every sender. Your mailboxes, website contact forms, newsletter tools, helpdesk, CRM and invoicing software may all send as your domain.
  2. Publish one SPF record covering all of them.
  3. Turn on DKIM for your mailboxes and for each third-party service.
  4. Publish DMARC with p=none and a reporting address.
  5. Read the reports for a few weeks. They reveal forgotten senders and anyone spoofing you.
  6. Tighten gradually to quarantine, then reject, once legitimate mail is passing consistently.

Common mistakes to avoid

How to check it is working

Send a test email to an account at a large mail provider and view the full message headers. Look for a line beginning Authentication-Results. You want to see spf=pass, dkim=pass and dmarc=pass. You can also look up your records directly with a command-line tool such as dig, or one of the many free online record checkers.

How TDesk handles this for you

Setting these records up by hand is fiddly, which is why TDesk does it automatically. When you add a domain to a hosting plan, the provisioning chain creates a full DNS zone with A, MX, SPF, DKIM and DMARC records already in place, and pushes it to a primary plus two geo-distributed secondary nameservers. A DKIM keypair is generated and published for you, so the domain can send authenticated mail straight away.

You still keep full control. The panel lets you edit A, AAAA, MX, TXT, CNAME and SRV records, so adding a newsletter service to your SPF record or publishing its DKIM key takes a minute. You can see the full list on the features page.

Authentication works in both directions, too. Inbound mail on every TDesk domain passes through MXGuard, our AI mail-security gateway, which checks SPF, DKIM, DMARC and ARC sealing alongside spam and virus scanning. It is included free.

Get your email authenticated from day one

TDesk Hosting is £4 per website a month (excluding VAT), with the panel, server, bandwidth, email, DNS, SSL, databases and daily backups included. No setup fees, no contracts, and you can cancel anytime. Add a domain and SPF, DKIM and DMARC are published for you in seconds. See TDesk pricing and get started.