Setup & AdminUpdated: October 2026·13 min read

How to Set Up SPF, DKIM and DMARC for Google Workspace (Stop Landing in Spam)

If mail from your new domain keeps landing in spam, missing authentication is almost always the reason. This guide walks you through the three DNS records Google Workspace needs — SPF, DKIM and DMARC — with the exact values, the Admin console clicks, and the checks that prove each one is working.

Time needed
30–45 minutes, plus up to 48 hours of DNS waiting
Difficulty
Moderate
You need
Super admin access to admin.google.com + your DNS host login
Works on
All plans (Business Starter, Standard, Plus and Enterprise)

What SPF, DKIM and DMARC do (and why you need all three)

Each record answers a different question a receiving server asks about every message. SPF: is this server allowed to send for this domain? DKIM: was the message signed by the domain owner and left unchanged? DMARC: what should I do if those checks fail, and who do I tell? A domain missing any of them looks exactly like one a spammer would forge.

RecordWhat it doesDNS record you addWhere the value comes from
SPFLists the servers allowed to send mail for your domainTXT at @ (your domain) with value v=spf1 include:_spf.google.com ~allFixed value from Google, plus any other senders you use
DKIMSigns each outgoing message so receivers can verify it came from you and was not alteredTXT at google._domainkey with value v=DKIM1; k=rsa; p=… (a long key)Generated in the Admin console, unique to your domain
DMARCTells receivers what to do when SPF and DKIM fail, and sends you reportsTXT at _dmarc with value v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.comYou write it yourself; start with p=none

The Gmail and Yahoo sender guidelines (February 2024)

Since 1 February 2024, Google’s email sender guidelines require every sender to Gmail to authenticate with SPF or DKIM, have valid forward and reverse DNS, use TLS and keep the Postmaster Tools spam rate below 0.3%. Senders of 5,000 or more messages a day to Gmail accounts must also pass both SPF and DKIM, publish DMARC (a p=none policy is enough), align the From: domain with the SPF or DKIM domain, and offer one-click unsubscribe on marketing mail. Yahoo announced matching rules at the same time.

Why this matters even if you send 20 emails a day: until you turn on DKIM, Google signs your mail with a generic default key on a gappssmtp.com domain, which does not count as your domain for DMARC. Spam filters treat that the way they treat any easily spoofed domain.

Before you start

  • Admin access. Log in at admin.google.com as a super admin. A personal @gmail.com login cannot do any of this.
  • Domain verified, MX records done. Your domain should already pass domain verification and deliver mail through Google’s MX records.
  • DNS host login. All three records are TXT records at whoever hosts your DNS: your registrar, Cloudflare if you moved your nameservers there, or Squarespace. If you bought the domain during Workspace signup, the partner registrar holds the DNS.
  • New domain? Expect a wait for DKIM. Google states that after turning on Gmail you must wait 24–72 hours before the DKIM key becomes available. Do SPF first and come back for DKIM.
  • Plan. Any edition works; see pricing.
Start your 14-day free trial

14-day free trial · 10% off your first year with our referral link

Step 1: Add the Google Workspace SPF record

The exact record

Add this TXT record at your DNS host (Google’s Set up SPF page gives the same string).

  • Type: TXT
  • Host / Name: @ (or blank, depending on the host)
  • Value: v=spf1 include:_spf.google.com ~all
  • TTL: leave the default

A domain may have only one SPF record. If a TXT record starting with v=spf1 already exists — left over from Microsoft 365, a web host or a previous provider — edit it instead of adding a second one; two SPF records make SPF fail for everything. Keep the ~all ending (soft fail), which is what Google recommends: -all (hard fail) “can be overly restrictive and cause delivery issues for legitimate email”, and ?all authenticates nothing. Google says SPF can take up to 48 hours to start working.

Merging other senders without breaking the 10-lookup limit

An SPF record may trigger at most 10 DNS lookups. Every include:, a, mx, redirect= and exists costs one, nested includes count too, and ip4: or ip6: entries are free. Go over ten and the record returns a permanent error, as bad as having none. As of October 2026 Google’s _spf.google.com resolves to a flat list of IP ranges, so it uses just one lookup. For the services you add:

  • Another mail platform. Put the extra include in the same record. Google’s own example for a company that also sends from Microsoft 365 is v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all.
  • Mailchimp. Its authentication wizard (profile icon → Account & billing → Domains → Start authentication) gives you two CNAME records for DKIM and a DMARC TXT record. It does not ask for an SPF include, so do not add one “just in case”.
  • Website contact forms. If your form plugin sends through your web host’s mail server, you need the host’s include value from its help pages. Better: send the form by SMTP through a Google Workspace mailbox or Google’s SMTP relay, so the mail leaves through Google’s servers and is already covered.
  • Housekeeping. Only include services that put your domain in the From: address; remove the ones you have stopped using.

Where to add TXT records at common registrars

The same screen is used for all three records. Most hosts append your domain to the Host field automatically, so you type only @, google._domainkey or _dmarc.

  • GoDaddy: your domain’s DNS page → add a TXT record, with @ as the Name for SPF.
  • Namecheap: Domain List → Manage → Advanced DNS → Add New Record → TXT Record; Namecheap states the domain itself must not go in the Host field.
  • Cloudflare: DNS → Records → Add record → TXT; proxying never applies to TXT records.
  • Squarespace: Domains → your domain → DNS → Custom records; Squarespace appends your domain to the Host field.
  • Porkbun: Domain Management → Details → DNS Records → Add Record; Host takes only the part before your domain.
  • Hostinger: the DNS zone editor in hPanel, with @ as host for the root record.
  • Bluehost: Hosting → My Plans → cPanel → Domains → Zone Editor → Manage → + Add Record.

How to check it worked: open the Check MX tool in the Google Admin Toolbox and enter your domain. It shows the SPF record it found, flags duplicates and counts your DNS lookups.

Step 2: Generate and publish your DKIM key

People still search for “G Suite DKIM”; G Suite was renamed Google Workspace in 2020 and the setup is unchanged. These steps mirror Google’s Set up DKIM page.

Generate the key in the Admin console

  1. Go to Admin console → Menu → Apps → Google Workspace → Gmail → Authenticate email.
  2. If you have more than one domain, pick the one you are setting up from the Selected domain list.
  3. Click Generate New Record. Set the key length to 2048 (Google’s recommendation), leave the prefix selector as google — choose 1024 only if your DNS host rejects long TXT values — and click Generate.
  4. The page now shows the hostname google._domainkey and a TXT value beginning v=DKIM1; k=rsa; p= followed by the public key. Leave this tab open.

If you get an error that the DKIM record was not created, the domain is too new: wait 24–72 hours after turning on Gmail and try again.

Add the TXT record at your DNS host

  • Type: TXT
  • Host / Name: google._domainkey (if your host does not append the domain, enter google._domainkey.yourdomain.com)
  • Value: paste the entire string from the Admin console, with no extra spaces or line breaks

A 2048-bit key is longer than the 255 characters one TXT string can hold; most hosts split it automatically. If yours refuses the value, Google’s Troubleshoot DKIM issues page explains splitting it into two quoted strings, or regenerate a 1024-bit key.

Click Start authentication

Back on the Authenticate email page, click Start authentication. Google says DKIM can take up to 48 hours to start working, and that the message “You must update the DNS records for this domain” can linger for up to 48 hours even when the record is correct. Once live, the page reads Authenticating email with DKIM. Each domain needs its own key, so repeat this for every secondary domain you send from (see adding multiple domains).

How to check it worked: run Check MX with google in the DKIM selector field, then send a test to a personal Gmail account and open Show original (Step 5): Google’s own test is dkim=pass in the Authentication-Results header.

Step 3: Publish a DMARC record (start with p=none)

Google’s Set up DMARC page says to turn on SPF and/or DKIM first and allow 48 hours before adding DMARC. Nothing changes in the Admin console; DMARC is purely a DNS record.

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

p=none means “monitor only”: receivers deliver mail as usual but start sending aggregate reports to the rua address. Google recommends a dedicated group or mailbox because volume can be high; a free Google Group such as dmarc@yourdomain.com is ideal. Create it before you publish the record. A report address on a different domain needs its own TXT record authorising the reports.

Reports arrive as XML attachments, usually once a day from each service that received your mail, listing each sending IP, its message count and the SPF, DKIM and DMARC results. For a small domain, skimming a few each week to confirm Google’s servers show pass is enough, and pasting one into Gemini and asking “which sources failed?” gets you a plain-English summary. Leave out ruf: Gmail does not send forensic reports.

How to check it worked: Check MX now lists your DMARC record, and a test message’s Show original shows DMARC: PASS. Then let a week of reports accumulate before Step 4.

Get Google Workspace with 10% off

14-day free trial · 10% off your first year with our referral link

Step 4: Tighten DMARC from p=none to quarantine, then reject

Google’s Recommended DMARC rollout is a three-stage ramp; rushing it is how businesses block their own invoices.

  1. Monitor for at least a week. Stay on p=none and review reports daily; a week is usually enough to see every mail stream. Any legitimate source that fails — a CRM, an invoicing app, a website form — needs adding to SPF or its own DKIM before you move on.
  2. Quarantine a slice. Change the record to v=DMARC1; p=quarantine; pct=5; rua=mailto:dmarc@yourdomain.com. The pct tag applies the policy to only that percentage of failing messages; Google suggests 10% for a small organisation and 1% for a large one. Raise it in steps to 100 while watching the reports.
  3. Reject. Once quarantine at 100% causes no problems, switch to v=DMARC1; p=reject; rua=mailto:postmaster@yourdomain.com,mailto:dmarc@yourdomain.com. Google’s caution is blunt: messages that fail DMARC under reject are never delivered. Leaving pct out means 100%.

Alignment. A message passes DMARC when SPF or DKIM passes with a domain that aligns with the From: address. The default, relaxed alignment also accepts subdomains of your domain; strict (adkim=s; aspf=s) demands an exact match. Google notes relaxed alignment typically provides sufficient spoofing protection and that strict can push legitimate subdomain mail into spam, so a small business should simply not write those tags.

Step 5: Test SPF, DKIM and DMARC

  1. Check MX. In the Google Admin Toolbox, enter your domain and google as the DKIM selector. It checks MX, SPF (with the lookup count), the DKIM key and the DMARC record in one pass.
  2. Send a test and read Show original. Email a personal Gmail address from your Workspace account, open the message in Gmail on a browser, click the More icon (three dots next to Reply) and choose Show original, as described in Google’s full header help page. The summary at the top should read SPF: PASS, DKIM: PASS with your domain, and DMARC: PASS; the Authentication-Results header below repeats it as spf=pass, dkim=pass and dmarc=pass.
  3. mail-tester. mail-tester.com gives you a one-time address; send it a real-looking message and it scores the result, flagging any SPF, DKIM or DMARC failure.
  4. Postmaster Tools. Once you send regularly, verify your domain at postmaster.google.com to watch spam rate, domain reputation and authentication rates; this is where the 0.3% spam-rate ceiling is measured.

Common mistakes and troubleshooting

  • Two SPF records. Google’s Troubleshoot SPF issues page says each domain can have only one SPF record listing all its senders. Merge them into one v=spf1 line and delete the rest; changes can take 24–48 hours to take effect globally.
  • DKIM key not showing. On a domain where Gmail was turned on less than 24–72 hours ago, the Admin console cannot generate a key yet; also confirm you are signed in as a super admin with Gmail turned on for the organisation.
  • “Not authenticating” after adding the record. You have not clicked Start authentication, or it has been less than 48 hours. Use the Admin Toolbox Dig tool to confirm the TXT record at google._domainkey.yourdomain.com exists and matches the console value exactly; a truncated 2048-bit key or a host name doubled up as google._domainkey.yourdomain.com.yourdomain.com are the usual culprits.
  • DMARC fails on forwarded mail. When a recipient auto-forwards your message or a mailing list redistributes it, the forwarding server is not in your SPF record and may alter the body, so SPF fails and DKIM can report “body hash did not verify”. This is expected: clean forwards keep DKIM intact, and forwarders that add ARC headers (Gmail does) preserve the original results. A small, steady trickle of such failures in your reports is normal.
  • Soft fail versus hard fail. Switching to -all does not improve deliverability; it just bounces mail from any sender you forgot. Keep ~all and let the DMARC policy do the enforcing.
  • Everything passes, mail still goes to spam. Authentication is necessary, not sufficient. A brand-new domain has no reputation, so warm up gradually, avoid link shorteners and attachments in first contacts, and watch the spam-rate dashboard; Google’s advice here is to review your sending practices against the sender guidelines.
Set up your domain email today

14-day free trial · 10% off your first year with our referral link

Related setup guides

Frequently asked questions

What is the SPF record for Google Workspace?

The SPF record for Google Workspace is a TXT record on your domain (host @) with the value v=spf1 include:_spf.google.com ~all. If other services also send mail from your domain, add their include values to this same record rather than creating a second one, because a domain may only have one SPF record and the record may trigger at most 10 DNS lookups.

Do I need SPF, DKIM and DMARC if I only send a few emails a day?

Yes. Google’s sender guidelines require every sender to Gmail to authenticate with SPF or DKIM, and only senders of 5,000 or more messages a day must have all three. In practice, a small domain with no DKIM key of its own and no DMARC record is the easiest to spoof and is treated with suspicion by spam filters, so setting up all three takes under an hour and is worth it.

What does DMARC p=none do?

A DMARC record with p=none is a monitor-only policy. Receiving servers deliver your mail exactly as they would without DMARC, but they send aggregate reports to the address in the rua tag so you can see which servers are sending as your domain and whether they pass SPF and DKIM. Google recommends starting with p=none for at least a week before moving to quarantine and then reject.

Why is my Google Workspace email going to spam even though SPF and DKIM pass?

Authentication is necessary but not sufficient. Common causes are a brand-new domain with no sending history, a missing DMARC record, messages that look like bulk mail, link shorteners or attachments in first contacts, and recipients who did not expect the message. Check your spam rate and domain reputation in Google Postmaster Tools, warm the domain up gradually, and keep the spam rate well under 0.3%.

Is G Suite DKIM the same as Google Workspace DKIM?

Yes. G Suite was renamed Google Workspace in 2020 and the DKIM setup is identical: in the Admin console go to Apps, Google Workspace, Gmail, Authenticate email, generate a 2048-bit key with the google selector, publish it as a TXT record at google._domainkey, and click Start authentication. Older guides that mention G Suite still describe the same screens.

How long does it take for SPF, DKIM and DMARC to start working?

DNS changes usually show up within an hour, but Google says it can take up to 48 hours for SPF and DKIM authentication to start working, and that the DKIM page may keep asking you to update DNS for up to 48 hours. Google also asks you to wait 48 hours after SPF and DKIM are live before adding DMARC, and new domains must wait 24–72 hours after Gmail is turned on before a DKIM key can be generated.

Can I have two SPF records on one domain?

No. Each domain can have only one SPF record, and if two TXT records start with v=spf1 the check returns a permanent error and SPF fails for all your mail. Combine every sender into a single record, for example v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all, and delete the extra one.

Where should I send DMARC reports?

Send them to a dedicated mailbox or a free Google Group such as dmarc@yourdomain.com rather than a personal inbox, because receivers send a report roughly once a day each and the volume adds up. The reports are XML files that are awkward to read raw; small domains can skim them weekly, and businesses that send a lot of mail usually use a DMARC reporting service to summarise them.

MyOwnGoogle is reader-supported. If you start a Google Workspace trial through our links we may earn a commission, at no extra cost to you. This never affects what we recommend.