Blog

SPF, DKIM and DMARC Setup for Google Workspace: A Step-by-Step Guide

By Instilify

If you send email from Google Workspace, three DNS records decide whether receiving servers can trust that mail really came from you: SPF, DKIM and DMARC. Since 2024, Gmail and Yahoo require them for higher-volume senders, and since May 2025 Outlook.com does too. Even at low volumes, Google requires at least SPF or DKIM.

This guide walks through all three for Google Workspace, using Google's own documentation, and explains the part most guides skip: alignment.

Official references used throughout:

What each record does

Record What it proves Where it lives
SPF Which servers may send mail for your domain TXT record at your domain root
DKIM The message was signed by your domain and not altered TXT record at selector._domainkey.yourdomain
DMARC What receivers should do if SPF/DKIM fail or don't align, and where to send reports TXT record at _dmarc.yourdomain

Before you start

  • You need a super administrator account in the Google Admin console (Google's DKIM steps require it).
  • You need access to your DNS provider (GoDaddy, Cloudflare, Namecheap, your registrar, etc.).
  • List every service that sends email as your domain: Google Workspace, your CRM, billing system, helpdesk, newsletter tool. Each needs to be authenticated too.

Step 1: Set up SPF

1.1 Check for an existing SPF record

Look in your DNS for a TXT record at the root (@) starting with v=spf1. A domain must have only one SPF record. If one exists, edit it rather than adding a second.

1.2 Publish the record

Google's example SPF record for Workspace is:

v=spf1 include:_spf.google.com ~all

If other services send for your domain, add their include: values to the same record, for example:

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

(Use the exact include value each provider documents.)

1.3 SPF tips

  • ~all (soft fail) is Google's example; -all (hard fail) is stricter. Many teams start with ~all.
  • SPF has a limit of 10 DNS lookups. Too many include: entries can break it.
  • SPF checks the envelope sender (Return-Path), not the visible From address. That's why DKIM and DMARC matter.

Step 2: Set up DKIM

2.1 Generate the key in Google Admin

From Google's DKIM help:

  1. Sign in to the Google Admin console as a super administrator.
  2. Go to Menu → Apps → Google Workspace → Gmail.
  3. Open Authenticate email.
  4. Select your domain.
  5. Choose key length: 2048-bit if your DNS provider supports it (recommended), otherwise 1024-bit.
  6. Keep the default prefix selector google unless your domain already uses that selector.
  7. Click Generate.

If you've just turned on Gmail for your organisation, Google notes you may need to wait 24 to 72 hours before a DKIM key can be generated.

2.2 Add the TXT record at your DNS provider

Create a TXT record:

  • Host/Name: google._domainkey (or yourselector._domainkey)
  • Value: the full v=DKIM1; k=rsa; p=... string shown in Admin console

Some DNS providers require long 2048-bit values to be split into multiple quoted strings. Follow your provider's instructions.

2.3 Turn on signing

Back in Authenticate email, click Start authentication. Google notes it can take up to 48 hours after adding the record for DKIM to start working.

2.4 Why key length matters

Gmail's sender guidelines say mail to personal Gmail accounts requires a DKIM key of 1024 bits or longer, and recommend 2048-bit where supported.

Step 3: Set up DMARC

Google advises turning on SPF and DKIM before DMARC, and checking that third-party senders are authenticated.

3.1 Create a reporting mailbox

Set up a group or mailbox such as dmarc-reports@yourdomain.com. Aggregate reports arrive as XML; a DMARC report viewer can make them readable.

3.2 Publish a monitoring record

Create a TXT record:

  • Host/Name: _dmarc
  • Value:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com

p=none means "monitor only, don't change delivery." Gmail, Yahoo and Outlook.com accept p=none as the minimum policy for higher-volume senders.

3.3 Tighten over time

After a few weeks of clean reports, showing all legitimate sources pass:

v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@yourdomain.com

Then increase pct, and eventually move to p=reject. Microsoft's Outlook.com policies note p=reject is recommended. Don't rush: a strict policy with a forgotten sending service will block your own legitimate mail.

Alignment: the part most guides skip

DMARC passes only if SPF or DKIM passes and the authenticated domain aligns with the domain in the visible From: header.

  • DKIM alignment: the d= domain in the DKIM signature matches your From domain. With Workspace DKIM on your own domain, this aligns.
  • SPF alignment: the Return-Path domain matches your From domain.

Google's sender guidelines require From-domain alignment with SPF or DKIM for higher-volume direct mail. Third-party tools that send "as you" from their own servers often break alignment unless configured with your domain's DKIM. When an outreach tool sends through your own Workspace mailbox (the bring-your-own-mailbox model), messages are signed with your Workspace DKIM, so alignment generally follows. See BYOM vs shared IPs.

Step 4: Test

  1. Send a message from your Workspace mailbox to a personal Gmail account.
  2. Open it, click the three-dot menu, then Show original.
  3. Check SPF: PASS, DKIM: PASS and DMARC: PASS, with your domain shown.
  4. Use Google's Check MX / Admin Toolbox to check your DNS setup.
  5. Once you have enough volume, register your domain in Google Postmaster Tools to view spam rate and authentication data.

Common mistakes

  • Two SPF records. Merge them into one.
  • Exceeding 10 SPF lookups. Remove unused services.
  • DKIM record pasted with extra quotes or spaces. Re-copy from Admin console.
  • Forgetting to click "Start authentication".
  • Jumping to p=reject on day one.
  • Sending from a subdomain without records. Each sending domain or subdomain needs proper authentication; DMARC can be inherited from the parent domain, but SPF and DKIM must be correct for what you actually send.

What about Microsoft 365?

The concepts are identical; the steps differ. Microsoft documents SPF, DKIM and DMARC for Microsoft 365, and its support article on error 550 5.7.515 explains how Outlook.com evaluates authentication for high-volume senders.

After authentication: responsible sending

Authentication proves identity. It doesn't make mail wanted. For outreach, pair it with:

  • Low per-mailbox daily caps (guide).
  • A clear opt-out in every email, honoured quickly.
  • Stop-on-reply.
  • Relevant, verified contacts.

Read the full rulebook in Google, Yahoo and Outlook sender rules.

Where Instilify fits

Instilify connects your own business mailboxes and sends through them, so your domain's SPF, DKIM and DMARC apply to every outreach email. It doesn't manage your DNS and can't guarantee deliverability. Instilify is in early access.

Summary

For Google Workspace: one SPF record with include:_spf.google.com; a 2048-bit DKIM key generated in Admin console, published at google._domainkey, then switched on; and a DMARC record starting at p=none with reporting, tightened gradually. Check alignment, test with "Show original", and remember authentication is the minimum, not a guarantee.

Frequently asked questions

What SPF record does Google Workspace use?

Google's example SPF record for Workspace is v=spf1 include:_spf.google.com ~all, published as a TXT record at your domain. If other services also send mail for your domain, include them in the same single SPF record.

How long does DKIM take to start working in Google Workspace?

Google says it can take up to 48 hours after you add the DKIM TXT record for authentication to start working. Also, after turning on Gmail for a new organisation, you may need to wait 24 to 72 hours before you can generate a DKIM key.

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

Google recommends 2048-bit keys where your DNS provider supports them, as they are more secure. Gmail requires a key of at least 1024 bits for mail to personal Gmail accounts.

What DMARC policy should I start with?

Start with p=none and a reporting address so you can monitor results without affecting delivery, then move to quarantine and reject once you're confident all legitimate mail passes. Google and Yahoo accept p=none as the minimum for high-volume senders.

Does setting up SPF, DKIM and DMARC guarantee inbox placement?

No. Authentication is required by mailbox providers but doesn't guarantee placement. Content relevance, recipient engagement, complaint rates and volume still matter.