UK domains, DNS and business email · real people · since 200601623 650333 · Client login
Search domains

What SPF, DKIM and DMARC records do I need?

You need one SPF TXT record listing every sender, a DKIM record for each sending service, and a DMARC TXT record at _dmarc. The exact values depend on your email provider. dijitul publishes and checks these records for £45 an hour + VAT, or they are included with dijihost Complete Hosting at £1 a day + VAT.

Updated 2026-11-12 · by the dijitul DNS team · reviewed by , founder, building websites since 1996

Key facts

  • SPF is one TXT record on the root of the domain starting v=spf1; two SPF records make SPF fail.
  • SPF allows a maximum of 10 DNS lookups, and each include counts.
  • Microsoft 365 DKIM uses two CNAME records: selector1._domainkey and selector2._domainkey.
  • Google Workspace DKIM is a TXT record at google._domainkey, with a 2048-bit key recommended.
  • DMARC is a TXT record at _dmarc.yourdomain, usually starting at p=none.
  • Each sending service, such as a newsletter tool, needs its own DKIM selector.
  • TXT values over 255 characters must be split into strings, which most DNS editors do for you.

The three records in brief

All three live in your domain's DNS, wherever that is hosted: your registrar, your host or Cloudflare. SPF lists the servers allowed to send as your domain. DKIM publishes a public key that receivers use to check a signature on each message. DMARC tells receivers what to do when checks fail and where to send reports. For what DMARC means in detail, see what is DMARC.

Before you add anything, list every service that sends email as your domain: your mailbox provider, your website's contact forms, a newsletter tool, invoicing or booking software. Each one needs covering.

Records by provider

ProviderSPF includeDKIM
Microsoft 365include:spf.protection.outlook.comTwo CNAMEs, selector1._domainkey and selector2._domainkey, values from the Microsoft 365 Defender portal
Google Workspaceinclude:_spf.google.comTXT at google._domainkey, key generated in the Admin console
dijitul email hostingThe include or server address we give youTXT at the selector shown in your mail control panel
Newsletter toolOnly if the tool asks for oneUsually one or two CNAMEs under _domainkey, from the tool's domain settings

A Microsoft 365 only SPF record looks like v=spf1 include:spf.protection.outlook.com ~all. Microsoft 365 plus a newsletter tool that needs SPF becomes one record with both includes, for example v=spf1 include:spf.protection.outlook.com include:servers.newsletter.example ~all. Use the exact include your tool documents.

The DMARC record

Add a TXT record with the name _dmarc and a value such as:

v=DMARC1; p=none; rua=mailto:[email protected]

p=none changes nothing about delivery. It asks receivers to send aggregate reports to the rua address. Read the reports for a few weeks, fix any sender that fails, then move to p=quarantine and finally p=reject. DMARC passes when SPF or DKIM passes and matches the domain in the From address.

Entering the records in a DNS editor or Cloudflare

  • Name field: most editors add your domain automatically. Enter @ for the root (SPF), _dmarc for DMARC and selector1._domainkey for a DKIM selector, not the full domain. Typing the full domain can create _dmarc.example.co.uk.example.co.uk.
  • Type: TXT for SPF, DMARC and Google DKIM. CNAME for Microsoft 365 DKIM and most newsletter tools.
  • Cloudflare: DKIM CNAMEs must be DNS only (grey cloud). TXT records cannot be proxied anyway.
  • Quotes and long keys: paste the value without extra spaces or line breaks. Cloudflare splits long TXT values into 255-character strings for you.
  • TTL: Auto or one hour is fine.

Then check the records from outside to confirm they are live.

Common record mistakes

  • Two SPF records. Adding a second v=spf1 record for a new service instead of merging it. SPF then fails with a permanent error.
  • Too many lookups. More than 10 includes and other lookups also makes SPF fail.
  • Records at the wrong provider. Adding records at the old DNS host after the nameservers moved. Check which nameservers are live first.
  • DKIM published but not switched on. Microsoft 365 and Google both need you to enable signing after the record is live.
  • Proxied DKIM CNAMEs in Cloudflare.
  • Jumping to p=reject before reading DMARC reports.

For the full walkthrough with testing, see the step-by-step SPF, DKIM and DMARC setup guide on dijitulsupport.

How dijitul helps

dijitul publishes and checks SPF, DKIM and DMARC records for Microsoft 365, Google Workspace, our own email hosting and the tools you send from. On its own this is £45 an hour + VAT, or a fixed quote for several domains. DNS management and email hosting are included with dijihost Complete Hosting at £1 a day + VAT. See SPF, DKIM and DMARC records or ask for a quote.

Frequently asked questions

What SPF record do I need for Microsoft 365?

If Microsoft 365 is your only sender, publish one TXT record on the root of the domain: v=spf1 include:spf.protection.outlook.com ~all. If other services also send as your domain, add their includes to the same record rather than creating a second SPF record.

What DKIM records does Google Workspace need?

Generate a DKIM key in the Google Admin console, choosing 2048-bit if your DNS host allows it. Google gives you a TXT record at google._domainkey. Publish it exactly as shown, wait for it to be visible, then return to the Admin console and start authentication.

Can I have two SPF records?

No. A domain must have only one TXT record starting v=spf1. Two records cause a permanent error and SPF fails. Merge them into one, for example v=spf1 include:spf.protection.outlook.com include:_spf.google.com ~all, and keep the total under 10 DNS lookups.

What should I type in the Name field for DMARC?

In most DNS editors, including Cloudflare, type just _dmarc. The editor adds your domain automatically. Typing the full name often creates a doubled name such as _dmarc.example.co.uk.example.co.uk, which receivers will never find.

Should DKIM CNAME records be proxied in Cloudflare?

No. Set Microsoft 365 and newsletter DKIM CNAME records to DNS only, the grey cloud. If they are proxied, receivers cannot look up the real key and DKIM fails. Only website records should use the orange cloud.

Can dijitul add these records for me?

Yes. dijitul publishes and checks SPF, DKIM and DMARC for your providers for £45 an hour + VAT, or a fixed quote for bigger jobs. DNS management is included with dijihost Complete Hosting at £1 a day + VAT.

Related

Get domains, DNS and email sorted

Set up properly, records checked, and real people to call. DNS and email are included with dijihost hosting.

Call usSearch domains