Google Workspace Email Authentication Setup

Google's business email and productivity suite, formerly G Suite. This guide covers the complete email authentication stack for Google Workspace: SPF, DKIM, and DMARC. Each section gives you the exact DNS records, step-by-step instructions, common pitfalls, and how to verify your setup.

How to Set Up SPF for Google Workspace

Add the correct SPF record to authorize Google Workspace to send email on behalf of your domain. This prevents spoofing and improves deliverability.

Quick Answer — The Record You Need

Type

TXT

Host / Name

@

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

If you have other senders, add their include mechanisms before ~all.

Step-by-Step Setup

1

Sign in to your DNS provider

Log in to the control panel where your domain's DNS records are managed (e.g., Cloudflare, GoDaddy, Namecheap).

2

Navigate to DNS management

Find the DNS settings or DNS zone editor for your domain.

3

Check for an existing SPF record

Look for a TXT record that starts with v=spf1. You should only have one SPF record per domain. If one exists, you will modify it rather than creating a new one.

dig TXT yourdomain.com +short | grep spf
4

Create or update the SPF TXT record

Add a new TXT record (or edit the existing one) with the host set to @ and the value below. If you already have an SPF record with other includes, add include:_spf.google.com before the ~all or -all.

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

Verify the record

Wait a few minutes for DNS propagation, then verify the record is published. You can use dig or a DNS lookup tool.

dig TXT yourdomain.com +short

Before & After

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

SPF Gotchas

  • You must have only one SPF record per domain. Multiple SPF records cause authentication failures. Merge them into a single record.
  • Use ~all (softfail) during initial setup. Switch to -all (hardfail) once you confirm all legitimate senders are included.
  • Google Workspace uses _spf.google.com, not google.com or gmail.com. Using the wrong include will not authorize Google's mail servers.

SPF FAQ

What SPF record do I need for Google Workspace?

You need a TXT record at @ with the value v=spf1 include:_spf.google.com ~all. This authorizes Google's mail servers to send email on behalf of your domain.

Can I use -all instead of ~all for Google Workspace SPF?

Yes. Using -all (hardfail) is stricter and will cause non-authorized emails to be rejected outright. Start with ~all and move to -all once you have confirmed all senders are included.

I already have an SPF record for another service. How do I add Google Workspace?

Add include:_spf.google.com to your existing SPF record. For example: v=spf1 include:_spf.google.com include:otherprovider.com ~all. Do not create a second SPF record.

How to Set Up DKIM for Google Workspace

Enable DKIM signing in the Google Admin Console and publish the public key in your DNS to cryptographically authenticate outgoing email.

Quick Answer — The Record You Need

Type

TXT

Host / Name

google._domainkey

Value
v=DKIM1; k=rsa; p=YOUR_PUBLIC_KEY_FROM_ADMIN_CONSOLE

The actual public key value is generated in your Google Admin Console. The default selector is "google".

Step-by-Step Setup

1

Open the Google Admin Console

Go to admin.google.com and sign in with your administrator account.

2

Navigate to DKIM settings

Go to Apps > Google Workspace > Gmail > Authenticate email. Select your domain from the list.

3

Generate a new DKIM key

Click "Generate new record". Choose a DKIM key bit length of 2048 (recommended). The default prefix selector is "google". Click Generate.

4

Add the DKIM record to your DNS

Copy the generated TXT record value and create a new TXT record in your DNS with the host name google._domainkey and the value provided by Google.

Host: google._domainkey
Type: TXT
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqh...(your key)
5

Start authentication in the Admin Console

Return to the Google Admin Console and click "Start authentication". Google will verify the DNS record. It may take up to 48 hours for DNS propagation, but typically works within minutes.

DKIM Gotchas

  • You must click "Start authentication" in the Admin Console after adding the DNS record. The DKIM signing will not activate until you do this.
  • If your DNS provider does not support 2048-bit keys (long TXT values), select 1024-bit when generating. Some providers split long TXT values into multiple strings automatically.
  • The default selector is "google". If you change it, make sure the DNS host name matches: yourselector._domainkey.

DKIM FAQ

What is the DKIM selector for Google Workspace?

The default DKIM selector for Google Workspace is "google". This means the DNS record is published at google._domainkey.yourdomain.com. You can customize the selector during key generation.

How long does Google Workspace DKIM take to activate?

After adding the DNS record and clicking "Start authentication" in the Admin Console, DKIM signing typically activates within a few minutes. DNS propagation can take up to 48 hours in some cases.

Should I use 1024-bit or 2048-bit DKIM keys for Google Workspace?

Use 2048-bit keys for stronger security. Only use 1024-bit if your DNS provider cannot handle the longer TXT record value.

How to Set Up DMARC for Google Workspace

Publish a DMARC policy for your domain to instruct receiving mail servers how to handle messages that fail SPF and DKIM authentication.

Quick Answer — The Record You Need

Type

TXT

Host / Name

_dmarc

Value
v=DMARC1; p=none; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1

Start with p=none to monitor, then move to p=quarantine and finally p=reject.

Step-by-Step Setup

1

Ensure SPF and DKIM are configured

DMARC builds on SPF and DKIM. Verify both are set up and passing for your Google Workspace domain before adding DMARC.

2

Choose your initial DMARC policy

Start with p=none (monitoring only) to collect reports without affecting mail delivery. This lets you identify all legitimate senders before enforcing.

3

Create the DMARC TXT record

Add a TXT record in your DNS with the host _dmarc and your chosen DMARC policy. Replace the email address with your own reporting address.

v=DMARC1; p=none; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1
4

Monitor DMARC reports

Aggregate reports (rua) will be sent in XML format. Use a DMARC report analyzer to read them and identify any legitimate senders that are failing authentication.

5

Gradually enforce your policy

Once all legitimate senders pass, move to p=quarantine (with pct=10 initially), then increase to pct=100, and finally to p=reject.

v=DMARC1; p=reject; rua=mailto:[email protected]; fo=1

Before & After

Before
(no DMARC record)
After
v=DMARC1; p=none; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1

DMARC Gotchas

  • Do not jump straight to p=reject. You may block legitimate email from third-party services you forgot to authorize in SPF/DKIM.
  • The _dmarc record must be at _dmarc.yourdomain.com, not _dmarc.mail.yourdomain.com or any subdomain, unless you want a subdomain-specific policy.
  • Google sends DMARC aggregate reports as large XML files. Use a dedicated DMARC reporting service to parse them rather than reading raw XML.

DMARC FAQ

What DMARC record should I use with Google Workspace?

Start with v=DMARC1; p=none; rua=mailto:[email protected] to monitor authentication results. After confirming all legitimate email passes, gradually move to p=quarantine and then p=reject.

Does Google Workspace support DMARC alignment?

Yes. Google Workspace emails align on both SPF (envelope sender matches header from) and DKIM (d= domain matches header from) when properly configured.

How long should I stay on p=none before enforcing?

Monitor with p=none for at least 2-4 weeks. Review aggregate reports to ensure all legitimate sending services are properly authenticated before moving to quarantine or reject.

Verify Your Google Workspace Setup

Once your SPF, DKIM, and DMARC records are in place, run a full domain scan to confirm everything is configured correctly. DNS changes typically propagate within minutes but can take up to 48 hours.

Setup Guides for Other Providers