Home / Guides / Platforms

SPF, DKIM and DMARC for Google Workspace

The exact DNS records and Admin console steps to authenticate a Google Workspace domain, plus how to add newsletter and CRM tools without breaking SPF.

7 min read · Updated 27 October 2026 · By the dijitul team

To authenticate a Google Workspace domain you need three DNS records: an SPF record containing include:_spf.google.com, a 2048-bit DKIM key generated in the Admin console and switched on with "Start authentication", and a DMARC record on _dmarc. This guide walks through each one using example.co.uk, then covers the bit most people get wrong: adding other sending services without breaking SPF.

Gmail and Yahoo have required authentication from bulk senders since February 2024, and Microsoft followed for Outlook.com in May 2025. Even if you only send a few hundred emails a day, unauthenticated mail is far more likely to land in spam. If you want the background on each standard first, see our guides to SPF, DKIM and DMARC.

Step 1: publish your SPF record

SPF tells receiving servers which machines are allowed to send mail for your domain. For a domain that only sends through Google Workspace, add this TXT record at the root of the domain (often shown as @ in DNS panels):

Type:  TXT
Host:  @
Value: v=spf1 include:_spf.google.com ~all

The ~all at the end is a "soft fail": mail from anywhere else is treated as suspicious rather than rejected outright. That is the sensible choice while you are still discovering everything that sends as your domain. Once DMARC is in place, DMARC does the enforcing, so there is little extra benefit in switching to -all.

You can only have one SPF record per domain. If your DNS already contains a TXT record starting v=spf1, edit that record instead of adding a second. Two SPF records cause a permanent error and SPF fails for every message.

Step 2: generate your DKIM key

This is the step that is easy to miss. Out of the box, Google Workspace signs your mail with a Google-owned domain rather than yours. That signature passes DKIM, but because the signing domain does not match your From address it does nothing for DMARC alignment. You need to create your own key.

At the time of writing, the path in the Google Admin console is:

  1. Sign in at admin.google.com as a super administrator.
  2. Go to Apps > Google Workspace > Gmail > Authenticate email.
  3. Choose your domain from the drop-down (each domain and alias domain needs its own key).
  4. Click Generate new record.
  5. Set the key length to 2048 and leave the selector prefix as google unless you already use that selector elsewhere.
  6. Click Generate. Google shows a DNS host name and a long TXT value starting v=DKIM1; k=rsa; p=.

Add that as a TXT record in your DNS:

Type:  TXT
Host:  google._domainkey
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...(long key)...IDAQAB
Some DNS panels add your domain automatically, so enter just google._domainkey as the host, not google._domainkey.example.co.uk, or you will end up with the domain twice. A 2048-bit key is longer than 255 characters; most modern DNS providers split it for you, but older ones need it broken into several quoted strings. If yours cannot store it at all, that is a good reason to move your DNS.

Step 3: start authentication

Once the TXT record is live, go back to the same Authenticate email screen and click Start authentication. The status should change to say Google is authenticating email with DKIM. From this point every message sent from Workspace carries a signature with d=example.co.uk.

If you get an error, the record has either not propagated yet or was pasted incorrectly. Google says DNS changes can take up to 48 hours. Common mistakes are a missing final character of the key, stray quote marks inside the value, or the doubled host name mentioned above.

Step 4: add a DMARC record

DMARC ties SPF and DKIM to the domain in your From address and tells receivers what to do when both fail. Start in monitoring mode so nothing is blocked while you check your reports:

Type:  TXT
Host:  _dmarc
Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@example.co.uk

The rua address receives daily aggregate reports from large mailbox providers. Read them (or use a report processing service) for a few weeks to find any legitimate service that is failing. When everything you send passes, move to p=quarantine and eventually p=reject. The DMARC guide explains that rollout in more detail.

Check your setup now: run a free test at mail-tester.co.uk and see your score in seconds.

Adding third-party senders without breaking SPF

Very few businesses send only from Gmail. A typical small business might also send newsletters from an email marketing platform, invoices from accounting software, and notifications from a website contact form. Each of those needs handling, and this is where SPF records tend to go wrong.

Merge, never duplicate

Add each service's include to your existing record. For example, if your marketing platform tells you to add include:servers.example-esp.com, the record becomes:

v=spf1 include:_spf.google.com include:servers.example-esp.com ~all

Watch the ten-lookup limit

SPF allows a maximum of ten DNS lookups when a receiver evaluates your record, and nested includes count. Google's include alone uses several of them. Add three or four more services and it is easy to go over, at which point SPF returns a permanent error. Our guide to fixing too many SPF lookups covers how to trim it.

Prefer DKIM on your own domain

Many services send from their own bounce domain, so their SPF check is done against their domain, not yours. That means adding their include to your record may not help DMARC at all. What does help is DKIM signing with your domain. Most reputable platforms offer a "domain authentication" step where you add one or two CNAME or TXT records; do that for every service, because DKIM alignment is what lets their mail pass DMARC.

Website and contact form mail

Mail from a website often goes out from the web server itself with your address in the From line, which fails both SPF and DKIM. The cleanest fix is to send it through your Workspace account via authenticated SMTP, or through a transactional email service that signs with your domain.

Domains, DNS & emaildijitul DNSRegister and transfer .uk and .com domains, with Cloudflare DNS management and business email. SPF, DKIM and DMARC set up properly.Fix your DNS with dijitul

Step 5: verify everything with a test

DNS panels will happily accept a record with a typo, so do not assume it works. Send a normal email from your Workspace mailbox to the unique address shown on the Mail Tester UK home page. The report shows whether SPF passed, whether DKIM was signed with d=example.co.uk rather than a Google domain, and whether DMARC aligned. Repeat the test from each third-party service you use, since each one is a separate sending path.

In the message headers, a correctly configured Workspace message looks something like this:

Authentication-Results: mx.example.net;
  dkim=pass header.d=example.co.uk header.s=google;
  spf=pass smtp.mailfrom=you@example.co.uk;
  dmarc=pass header.from=example.co.uk

Quick checklist

  • One SPF TXT record on the root, containing include:_spf.google.com.
  • A 2048-bit DKIM key published at google._domainkey and authentication started.
  • Separate DKIM keys generated for any secondary or alias domains that send mail.
  • A DMARC record at _dmarc, starting at p=none with a report address.
  • Every third-party sender set up with DKIM on your domain, and SPF under ten lookups.
  • A test from each sending path showing SPF, DKIM and DMARC all passing.

With those in place, your Workspace mail meets the authentication part of the Gmail and Yahoo sender requirements, and you have a solid base for everything else that affects deliverability.

Frequently asked questions

What SPF record does Google Workspace need?

At minimum v=spf1 include:_spf.google.com ~all, published as a TXT record on your root domain. If other services send as your domain, add their includes to the same single record rather than creating a second one.

Does Google Workspace sign emails with DKIM automatically?

Not with your domain. Until you generate a key and start authentication in the Admin console, Google signs with a default Google-owned domain, which passes DKIM but does not align with your From address for DMARC.

Should I use a 1024-bit or 2048-bit DKIM key?

Use 2048-bit. Only fall back to 1024-bit if your DNS provider genuinely cannot store a long TXT value, and plan to move away from that provider.

Why does the Start authentication button give an error?

Usually because the DKIM TXT record has not propagated yet, or it was pasted with missing characters or extra quotes. Check the record with a DNS lookup, wait a few hours and try again.

How long does it take for Google Workspace DKIM to start working?

DNS changes often show within an hour, but Google says it can take up to 48 hours. Once you click Start authentication, new outgoing mail is signed straight away.

From the team behind Mail Tester UK

More from dijitul