Email Security · Jason Osborne

Google Workspace SPF Record, DKIM and DMARC Setup

Google Workspace SPF Record, DKIM and DMARC Setup

You need one SPF record, a DKIM key generated in the Google Admin console, and a DMARC record.

Before you start

List every service that sends email as your domain. If you only just turned on Gmail for the domain, Google asks you to wait 24 to 72 hours before creating a DKIM key.

1. SPF

  1. At your DNS host, look for a TXT record on the domain itself (often shown as @) starting v=spf1.
  2. If Google Workspace is your only sender, Google gives this value: v=spf1 include:_spf.google.com ~all
  3. If other services send too, keep them in the same record. Never add a second SPF record.

2. DKIM

  1. In the Admin console go to Menu, Apps, Google Workspace, Gmail, Authenticate email.
  2. Pick your domain under “Selected domain” and click “Generate New Record.”
  3. Choose 2048 bits (use 1024 only if your DNS host can’t take the longer value) and keep the selector google unless it is already in use. Click “Generate.” Note the DNS name Google shows.
  4. At your DNS host, add a TXT record with exactly the name and value Google shows (google._domainkey if you kept the usual selector). Copy all of it.
  5. Wait for DNS to update (it can take up to 48 hours), then click “Start authentication.”
  6. Send a message to a personal Gmail address, choose “Show original” and look for DKIM=pass with your own domain.

3. DMARC

First look for an existing TXT record at _dmarc. If there is one, don’t add a second one, and don’t replace a quarantine or reject policy with none. If there is none, add:

v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com

Then follow the staged path to reject.

Check your work

Run the free email security checker.

Official pages