How to Setup SPF and DKIM Records for Google Workspace

Setting up SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) records is essential for Google Workspace users who want to improve email deliverability and security.

These settings help prevent email spoofing by verifying that the emails sent from your domain are authorized and have not been tampered with in transit.

This tutorial will guide you through the process of configuring SPF and DKIM records step-by-step, complete with expert tips and visual aids to ensure a smooth setup.

Step-by-Step Guide

Access Your Domain Host

  1. Log in to your domain host. This is typically where you purchased your domain (e.g., GoDaddy, Namecheap).
  2. Navigate to the area where DNS settings are managed. This could be labeled as “DNS Management,” “Name Server Management,” or similar.

Configure SPF Record

  1. Locate the TXT records section in your DNS management area.
  2. Add a new TXT record with the following details:
    • Name/Host/Alias: Enter @ or leave it blank (this represents your domain).
    • Time to Live (TTL): 3600 or as recommended by your host.
    • Value/Answer/Destination: v=spf1 ~all
  3. Save the record. It may take up to 48 hours for DNS changes to propagate.
Screenshot of a dns management interface showing a txt record for with spf information included.

Enable DKIM in Google Workspace

  1. Log in to your Google Admin console (
  2. Go to Apps > Google Workspace > Gmail.
  3. Click on Authenticate email.
  4. Select your domain and click on Generate new record.
  5. Choose a DKIM key length (recommend 2048 bits for enhanced security).
  6. Click Generate.
Screenshot of gmail settings within the google workspace admin console, highlighting the "auth email authentication (dkim)" option in the "default routing" menu.

Add DKIM Record to Your Domain’s DNS

  1. After generating the DKIM key in Google Workspace, you will receive a DKIM record.
  2. Return to your domain’s DNS settings and add a new TXT record:
    • Name/Host/Alias: Enter the prefix provided by Google, typically google._domainkey.
    • TTL: 3600 or as recommended by your host.
    • Value: Paste the entire DKIM value provided by Google.
  3. Save the record. Like SPF, it may take some time for this to propagate.
Screenshot of a dns management interface showing a txt record for the domain with details including a dkim value.

Expert Tips

  • Verify records: Use our Check My Domain tool to verify that your SPF and DKIM records are correctly published.
  • Regular updates: Keep your SPF and DKIM settings up to date, especially if there are changes in your email sending practices or using new third-party services.
  • Monitor email performance: After setting up SPF and DKIM, monitor your email deliverability with Google Postmaster Tools and check for any issues that might arise.


By following these detailed steps, incorporating expert tips, and addressing common questions, you can effectively set up SPF and DKIM for your Google Workspace to enhance your organization’s email security and deliverability.

Frequently Asked Questions

What if I have multiple email service providers?

You can include multiple domains in your SPF record by adding additional include statements, like v=spf1 ~all.

How often should I update my DKIM key?

It’s recommended to rotate your DKIM keys annually or as per your organizational security policies.

Can setting up SPF and DKIM affect my email deliverability?

Yes, properly setting up SPF and DKIM can significantly improve your email deliverability by reducing the likelihood of your emails being marked as spam.

What should I do if my emails are still going to spam after setting up SPF and DKIM?

Ensure that your SPF and DKIM records are correct. Also, consider setting up DMARC (Domain-based Message Authentication, Reporting & Conformance) to further enhance email security and deliverability.

Hans Desjarlais
Hans Desjarlais

Hans Desjarlais is a seasoned tech entrepreneur with over a decade of industry experience. Faced with low open rates in his previous lifestyle software business, he dived into the complexities of email deliverability, performed rigorous testing and learned to achieve remarkable results. Now, he specializes in helping companies fix their email deliverability, avoid the spam folder and boost their email ROI.

Articles: 49

Leave a Reply