Google Workspace DNS Records Quick-Reference Table
Every custom Google Workspace domain needs one SPF record, one active DKIM TXT key, and one DMARC policy record in its authoritative DNS zone, alongside MX routing for incoming mail. Copy the exact host names and formats below into Cloudflare, Route 53, GoDaddy, Namecheap, or your domain registrar.
| Record | Type | Host / Name | Value | Recommended TTL |
|---|---|---|---|---|
| SPF | TXT | @ (root domain) | v=spf1 include:_spf.google.com ~all | 3600 (1 hour) |
| DKIM | TXT | google._domainkey | v=DKIM1; k=rsa; p=MIIBIjANBgkq... (copied from Admin Console) | 3600 (1 hour) |
| DMARC (start) | TXT | _dmarc | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com | 3600 (1 hour) |
| MX (current) | MX | @ (root domain) | smtp.google.com (Priority 1) | 3600 (1 hour) |
Some DNS panels expect your full domain appended to subdomain hosts (for example google._domainkey.yourdomain.com and _dmarc.yourdomain.com), whereas Cloudflare, Route 53, and Namecheap append the zone name automatically. Check your provider's existing records first so you do not accidentally create _dmarc.yourdomain.com.yourdomain.com.
Step 1: Publish the Google Workspace SPF Record
The Google Workspace SPF record authorizes Google's outbound mail servers to send email for your domain using a single TXT record at the zone apex (@).
# Google Workspace only:
v=spf1 include:_spf.google.com ~all
# Google Workspace + another sender (example: SendGrid):
v=spf1 include:_spf.google.com include:sendgrid.net ~all - Check whether your root domain already has a
TXTrecord starting withv=spf1. Never publish a second SPF record on the same hostname; edit the existing one instead. - Add
include:_spf.google.combefore the trailing qualifier (~all). Use~all(softfail) while rolling out DMARC so forwarding breaks are less likely to drop legitimate messages before DKIM is verified. - Never copy Google's raw IP blocks manually into your SPF record. Live DNS queries against
_spf.google.comreturn 4 IPv4 ranges and 6 IPv6/56ranges directly without nested includes, which consumes only 1 of the 10 DNS lookups permitted under the Sender Policy Framework specification (IETF RFC 7208), and keeps your authorization updated automatically if Google adds or rotates ranges. - Confirm the live syntax, single-record status, and lookup count with the SPF record checker. If combining Google Workspace with multiple marketing or CRM platforms pushes your total above 10 lookups, consolidate or trim unused includes with the SPF flattener.
Step 2: Generate and Activate Google Workspace DKIM
Google Workspace signs outgoing messages with a domain-specific cryptographic DKIM key only after a super administrator generates the key in Admin Console, publishes its DNS TXT record, and clicks Start authentication.
- Sign in to
admin.google.comwith a super administrator account. - Open Menu > Apps > Google Workspace > Gmail > Authenticate email.
- Choose your target domain in the Selected domain dropdown and click Generate new record.
- Select 2048-bit key length (recommended) and keep the default selector prefix
googleunless that selector is already taken on your domain. Only drop to 1024-bit if a legacy DNS provider cannot store TXT records longer than 255 characters. - In your DNS dashboard, create a
TXTrecord at hostgoogle._domainkey(or<prefix>._domainkey) and paste the entirev=DKIM1; k=rsa; p=...string from Admin Console. Modern hosts such as Cloudflare and Namecheap split 2048-bit values across 255-byte DNS chunks automatically; older panels may require enclosing two segments in quotes. - Wait for the record to appear publicly, verify the published key length and syntax with the DKIM record checker using selector
google, then return to Admin Console and click Start authentication. Google documents that status updates can take up to 48 hours to clear across global DNS caches.
When rotating a Google Workspace DKIM key later, generate the replacement under a new custom prefix (for example google2026) so the previous google._domainkey key remains published while in-flight messages are verified.
Step 3: Publish and Enforce Your Google Workspace DMARC Record
A DMARC policy at _dmarc.yourdomain.com tells receiving servers how to handle mail that fails aligned SPF and DKIM checks, and routes daily XML visibility reports back to your team under the active DMARC standard (IETF RFC 9989).
| Rollout stage | DNS TXT value at _dmarc | Typical duration | Operational effect |
|---|---|---|---|
| Stage 1: Monitor | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com | 2 to 4 weeks | Delivers all mail while aggregate XML reports reveal every active sender and alignment failure. |
| Stage 2: Quarantine | v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@yourdomain.com | 1 to 2 weeks per step | Routes unauthenticated or unaligned mail to spam; ramp pct from 25 to 100 as reports stay clean. |
| Stage 3: Reject | v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com | Ongoing production | Blocks spoofed mail claiming your domain after every legitimate service passes aligned SPF or DKIM. |
Google Workspace passes DMARC alignment in relaxed mode by default once custom DKIM signing is enabled (the DKIM d= domain matches your visible From header domain) and custom-domain mail uses your domain's return path for SPF. Validate your published policy tags with the DMARC record checker, follow the full DMARC enforcement roadmap before moving from p=none to p=reject, and review the Gmail and Yahoo bulk sender requirements if your domain sends 5,000 or more daily messages to personal Gmail or Yahoo inboxes.
How to Verify Google Workspace Authentication End to End
DNS publication confirms resolvers can read your records, while a live test message confirms Google Workspace is actually signing outbound headers and passing alignment at the recipient.
# Check SPF, DKIM (selector: google), DMARC, and MX from Linux / macOS:
dig +short TXT yourdomain.com | grep v=spf1
dig +short TXT google._domainkey.yourdomain.com
dig +short TXT _dmarc.yourdomain.com
dig +short MX yourdomain.com
# Windows PowerShell equivalents:
Resolve-DnsName yourdomain.com -Type TXT
Resolve-DnsName google._domainkey.yourdomain.com -Type TXT
Resolve-DnsName _dmarc.yourdomain.com -Type TXT
Resolve-DnsName yourdomain.com -Type MX - Send a plain test email from a Google Workspace mailbox on your custom domain to an external Gmail or Outlook account.
- Open the received message in Gmail, click the three-dot menu, and choose Show original.
- Confirm the summary banner shows
SPF: PASS,DKIM: PASS with domain yourdomain.com, andDMARC: PASS. IfDKIMshowsPASS with domain yourdomain-com.20230601.gappssmtp.cominstead of your own domain, custom DKIM is not turned on yet and DKIM alignment will fail under DMARC.
Common Google Workspace SPF, DKIM, and DMARC Errors and Fixes
Most Google Workspace authentication failures trace back to duplicate SPF TXT entries, truncated 2048-bit DKIM values, or unactivated custom DKIM signing on secondary domains. Match the symptom below to its direct DNS or Admin Console fix; if recipients are bouncing messages with a Gmail rejection code, see the SMTP 550 5.7.26 error guide.
| Error or symptom | Root cause | Direct fix |
|---|---|---|
| Two separate v=spf1 TXT records exist on @ | Receivers return SPF PermError and reject or demote messages because DNS only allows one SPF record per hostname. | Merge every sender into one TXT record such as v=spf1 include:_spf.google.com include:sendgrid.net ~all and delete the duplicate entry. |
| SPF lookup count exceeds 10 | Adding too many third-party marketing and CRM includes triggers SPF PermError even though include:_spf.google.com uses 1 lookup on its own. | Remove retired ESP includes, switch dedicated tools to subdomains, or flatten static vendor ranges before saving. |
| Start authentication fails for 2048-bit DKIM | Older DNS panels truncate TXT strings longer than 255 characters or fail to split the 2048-bit key into quoted chunks. | Split the TXT value into two quoted strings under 255 characters each per your DNS host syntax, or generate a 1024-bit key only if your host cannot store 2048-bit TXT records. |
| Recipients see "via" or "sent on behalf of" | The visible From header domain does not align with the authenticated SPF return path or DKIM signing d= domain. | Verify DKIM signing is active for the exact custom domain in Google Admin Console and confirm messages are sent from your custom domain rather than gmail.com. |
| Secondary domain or domain alias fails DKIM | Google Workspace does not automatically inherit DKIM keys across secondary domains or aliases. | Select each secondary domain and alias individually in the Admin Console dropdown, generate its own key, publish its TXT record, and click Start authentication. |
| Mail bounces with SMTP 550 5.7.26 | Gmail or another receiving server rejected unauthenticated mail because neither aligned SPF nor aligned DKIM passed. | Verify the live SPF record, confirm selector google resolves and signs outbound headers, and publish at least a p=none DMARC record. |
Next checks
- Verify inbound
smtp.google.compriority and host resolution with the MX record lookup. - Inspect daily aggregate XML reports locally in your browser during
p=nonemonitoring using the DMARC report analyzer. - Compare include syntax and selector formats for other sending platforms in the ESP DNS settings matrix before combining services into one SPF record.
- Confirm desktop and mobile mail client discovery records with the Autodiscover / Autoconfig checker.