If your business sends mail from Gmail on its own domain through Google Workspace, Google asks for three DNS records. This guide gives them in the order to add them, with the values from Google’s own help pages.

Google generates the DKIM key for you in the Admin console. All three records, the DKIM key included, are published at your DNS host, the company that holds your domain’s DNS records.

The records at a glance

Record Type Host Value
SPF TXT @ v=spf1 include:_spf.google.com ~all
DKIM TXT google._domainkey generated in the Admin console
DMARC TXT _dmarc v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com; fo=1

SPF: one TXT record at the root

SPF (Sender Policy Framework) is a list of the servers allowed to send mail for your domain. When Google Workspace is the only thing sending as you, Google’s record is all you need:

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

Google says it can take up to 48 hours for SPF to start working.

One record for every sender

Google states the rule as “Each domain can have one SPF record, but the record can specify additional servers and third parties that are allowed to send email from your domain.” If a newsletter tool, a CRM or your website’s contact form also sends as you and its setup asks for SPF, add its include: before ~all in that one record. Google’s own example for Google Workspace plus Salesforce:

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

If you find two SPF records, for example one left over from a previous email host, Google’s advice is to “consolidate all your SPF records into a single record.” Google also says that if you use subdomains, such as news.example.com, each one needs an SPF record of its own.

Read each service’s setup page first. Several do not need an include in your root record at all, so adding one would cost lookups for nothing. Our table of common includes lists which ones.

Check it with Show original

Send a test message from your Workspace account to a Gmail address outside your organization, such as a personal one. Then, in that inbox:

  1. Open the message.
  2. Next to Reply, click More > Show original.
  3. Find the Authentication-Results header and read the text after spf=.

spf=pass means the server that sent the message is in your record. For the other results, Google’s SPF troubleshooting page gives these fixes:

  • neutral, softfail or fail: the sending server is not in your record. Check the record’s syntax and add the missing sender.
  • temperror or permerror: a temporary DNS error, or a record that cannot be read correctly. Check the syntax, count your lookups (next section) and ask your DNS host about DNS problems.
  • best guess record: SPF is missing or set up wrongly. Check that exactly one SPF record exists and that its syntax is right.

You can also click Copy to clipboard on the Show original page and paste the header into the Messageheader tool in the Google Admin Toolbox, as Google’s own steps suggest.

Count your DNS lookups

Google: “The SPF specification allows for a maximum of 10 DNS lookups (for example, include, a, mx mechanisms).” Nested lookups count too: if an included record includes other domains, Google says “the other domains are counted toward your DNS lookup limit.” Going over can surface in confusing ways. Google warns that the errors “might include warnings that you don’t have an SPF record (even if you do have one).”

Google’s own include is cheap. On 6 October 2026, _spf.google.com listed only IP ranges, so it cost one lookup (measured with dig). The rest of your budget goes to other services. Google suggests the Check MX tool in the Google Admin Toolbox for the count, and our free checker counts nested lookups too.

~all or -all

Google: “Google recommends you use ~all in your SPF record.” With ~all (soft fail), Google says receiving servers “typically accept messages from senders that aren’t in your SPF record, but mark them as suspicious.” With -all (hard fail), they “may reject messages from senders that aren’t in your SPF record”, and Google adds that you then “can’t use those messages to troubleshoot your SPF record.”

Microsoft takes the other side for its own service and recommends -all for Microsoft 365 domains. For DMARC, the difference is small: only an SPF pass helps a message pass DMARC, so soft fail and fail count the same there. RFC 9989 points out one real risk of -all: a receiver may reject on the SPF fail before it ever checks DMARC, so mail that would have passed on DKIM can be refused, and it never appears in your DMARC reports. For a Google Workspace domain, keep Google’s ~all.

DKIM: generate the key, publish it, then start

DKIM (DomainKeys Identified Mail) signs every message with a key tied to your domain. Until you set it up, Gmail does not sign your mail in a way that DMARC can match to your domain.

Step 1: Generate the key

  1. Sign in to the Google Admin console with an administrator account.
  2. Go to Menu > Apps > Google Workspace > Gmail > Authenticate email.
  3. Select your domain and choose to generate a new record.
  4. Pick the key length. Google’s advice: choose 2048 if your domain provider supports 2048-bit keys, otherwise 1024.
  5. Leave the prefix selector as the default, google, unless you already use that name.

If you only just turned on Gmail for your domain, Google says you may need to wait 24 to 72 hours before you can generate the key.

Step 2: Publish it at your DNS host

Google shows a TXT record name and a long value starting with v=DKIM1. Add it exactly:

Type:  TXT
Host:  google._domainkey
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkq... (copy the full value from Google)

Step 3: Start authentication

Back on the Authenticate email page, click Start authentication. The status should change to say Gmail is authenticating email with DKIM. Google says it can take up to 48 hours for DKIM to start working after you add the record.

DMARC: one TXT record at _dmarc

DMARC (Domain-based Message Authentication, Reporting and Conformance) tells receivers what to do with mail that fails SPF and DKIM, and sends you reports. Google’s guidance is to start with the policy set to none, and to allow 48 hours after setting up SPF and DKIM before you set up DMARC.

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

Put your own domain in place of example.com, and create the dmarc-reports@ address first, as a user, group or alias, so reports are not bounced. Reports arrive as daily XML attachments, so a Google Group works better than a person’s inbox.

Google’s DMARC help page shows a finished, strict record as its example (p=reject with strict alignment). Publish p=none first and work towards it.

If a checker still returns a “no DMARC record found” result once the record is published, the host name is the first thing to look at.

Plain-English takeaway: Google’s three records are in the table at the top. The step that is easy to skip is clicking Start authentication in the Admin console once the TXT record at google._domainkey is live; until you do, Gmail is not signing and your mail fails DKIM alignment.

Where to add the records

All three records go in your DNS host’s control panel:

  1. Sign in at your DNS host and open the DNS settings for your domain.
  2. Add each record with the type, host and value above.
  3. Save. For DKIM, go back to the Admin console and click Start authentication.

Panels disagree on the host name field. Some want _dmarc on its own, some accept _dmarc.example.com. Our guides for GoDaddy, Cloudflare, IONOS, STRATO and Namecheap show which is which.

Common mistakes

  • Generating the key but not clicking Start authentication. The record is in DNS, but Gmail is not signing yet. Your mail still fails DKIM alignment.
  • A truncated DKIM key. The 2048-bit value is long. If your DNS panel cuts it short, DKIM fails. Some panels need the value split into several quoted strings. If yours will not accept it, generate a 1024-bit key instead, as Google suggests.
  • Two SPF records. If you moved from another email host, its SPF record may still be there. Merge everything into one record.
  • Forgetting other senders. Mail sent “from” your domain by a CRM, newsletter tool or website form does not go through Gmail. Each one needs its own SPF or DKIM setup with your domain before you enforce DMARC.
  • Adding DMARC before checking reports exist. Without a working rua mailbox, you will have no data when it is time to enforce.

Gmail’s own rules for senders

Since February 1, 2024, Google requires every sender to Gmail accounts to set up SPF or DKIM. Senders of more than 5,000 messages a day to Gmail accounts must have SPF, DKIM and a DMARC record, though the DMARC policy “can be set to none.” Following this guide meets those requirements for your Workspace mail.

Check your setup

Check your Google Workspace records for free once they are saved. The checker recognises Google Workspace, looks up SPF, the google DKIM selector and DMARC, and lists anything missing.

When to move to quarantine and reject

Google’s guidance is to move from p=none to quarantine and then reject once the reports show your legitimate mail passing. Until you do, security scanners show the “DMARC policy not enabled” warning for the domain. How long to wait at each step is in our post on moving from quarantine to reject.

With our guided DMARC setup, we read the reports, tell you what each sender needs and take the domain to p=reject. If we do not get there within 60 days, you get a full refund under our refund conditions.

Sources