How to add v=spf1 records for Google Workspace step-by-step

Optimize email authentication with Google Workspace's SPF setup. Ensure your domain's email integrity with this step-by-step guide!

Othman Katim
Email Marketing Expert
Nov 2025
X
Some spam issues ?
Mailwarm keeps your emails away from spam.
See More

What you need before you start

  • Access to your domain’s DNS zone at your registrar or DNS host.
  • Admin privileges in Google Workspace to review sending services.
  • A list of every system that sends mail for your domain (including transactional tools, CRMs, support desks, servers, etc.).
  • Basic command-line tools (dig or nslookup), or access to a trusted SPF checker.
  • Time for DNS propagation (usually minutes, sometimes a few hours, depending on Time To Live settings).
  • Optional but highly recommended: DMARC setup for monitoring and actionable reporting.

With these preparations, you’ll be ready to add v=spf1 records for Google Workspace confidently and avoid the most common pitfalls.

Step 1: Map every sender that uses your domain

Purpose: Build a complete inventory to ensure all legitimate senders are included in your SPF policy.

Start with listing every platform that sends on your behalf, which may include services like Google Workspace, newsletters, support desks, billing systems, or alerting tools. Include dedicated servers, web applications, and any IP addresses that send SMTP traffic. This thorough inventory forms the basis of your SPF record and keeps you from publishing a policy that mistakenly blocks legitimate mail.

Organize your senders into two categories: those that provide a published SPF include (such as cloud email providers) and those that only provide IP addresses. Be sure to note each domain include or IP range. This careful mapping will help you add v=spf1 records for Google Workspace that cover your actual sending environment. Skipping this step can result in softfails on critical messages.

Step 2: Check your current SPF to avoid duplicates

Purpose: Identify any existing record and decide if you need to update or replace it.

Query DNS for your root domain using:

dig TXT yourdomain.com +shortnslookup -type=TXT yourdomain.com

Look for any string starting with v=spf1. If more than one SPF record exists, plan to combine all mechanisms into a single, accurate record, multiple SPF records trigger a “PermError” and break authentication. If no record is present, you’ll be creating a new one in a later step to add v=spf1 records for Google Workspace properly.

Step 3: Choose your SPF policy end qualifier

Purpose: Decide how strictly receivers should treat mail that fails your SPF policy.

Most organizations begin with a soft fail ~all, which instructs recipients to treat unauthorized sources with suspicion, but not reject them outright. This is helpful while you confirm your coverage is complete. A hard fail -all rejects any source not in your policy and should be used when you’re confident your sender inventory is accurate and up to date.

Email forwarding can complicate SPF because forwarded messages may come from unfamiliar IP addresses. In some cases, Domain-based Message Authentication, Reporting & Conformance (DMARC) can help, by allowing DomainKeys Identified Mail (DKIM) to align and validate the email, successfully passing the authentication check. If you’re unsure, use ~all at first and move to -all after careful monitoring. Either way, ensure that your v=spf1 records for Google Workspace contain up-to-date domains and IP addresses for your services.

Step 4: Build the correct TXT string for Google Workspace

Purpose: Compose a clear, effective SPF record that authorizes Google and any other email services you use.

Google maintains an official SPF include that you should reference. For domains sending exclusively through Google, the minimal record is:

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

If you use additional platforms, add the domain name or IP addresses of these platforms before the ending qualifier. For example, integrating two third-party senders and a static IP would result in:

v=spf1 include:_spf.google.com include:sendgrid.net include:mailgun.org ip4:203.0.113.25 ~all

Only use a or mx if your web or mail exchange hosts directly send mail. Remember, SPF records are limited to 10 DNS lookups, each include:, a, mx, and ptr counts toward this limit. Exceeding this causes a “PermError.” Keep your SPF concise and tailored. If you want deeper context, read this primer on multi-domain SPF strategies for Google and Microsoft. It offers a detailed explanation of how “includes” work across multiple providers and domains.

If you are sending from a subdomain (e.g., billing.mail.yourdomain.com), publish the SPF record on the subdomain itself, not just the root. Make sure this matches your DMARC policy for that subdomain.

Step 5: Publish the TXT record in your DNS

Purpose: Enter the record at the correct location, formatted accurately with suitable timing settings.

Open your DNS provider’s zone editor. Click “Add Record,” select TXT, and use @ for the root domain or specify the subdomain as needed. Paste your complete SPF string, with quotes if your provider requires (many add them automatically, check their documentation before saving).

Use a reasonable Time To Live (TTL) value, such as 3600 seconds, which indicates how long the information should be cached before a refresh is required. This keeps propagation quick while validating changes. If distinct subdomains send unique mail streams, publish separate TXT records on each one for best results. Consistent practices help you add v=spf1 records for Google Workspace without affecting unrelated subdomains.

There should be only one SPF TXT record per host. If updates are needed, edit the existing record instead of adding an additional one.

Step 6: Wait for propagation and verify the result

Purpose: Ensure mail servers recognize your new SPF policy and that test messages are authenticated.

After the TTL expires, query DNS again:

dig TXT yourdomain.com +shortnslookup -type=TXT yourdomain.com

Send a test email to a Gmail account you own. View the original message headers and look for Received-SPF: pass and proper alignment with your domain. If you see softfail or neutral, review your domain inclusions and IPs for accuracy. This confirms you’ve added v=spf1 records for Google Workspace correctly.

You can run an SPF checker, available with many online tools, to catch any possible issues with DNS lookup limits or syntax mistakes. Repeat this validation step whenever you update your sending systems.

Step 7: Maintain a healthy SPF over time

Purpose: Keep your SPF record up to date as your email environment changes.

Whenever you add or remove a platform, promptly update your SPF includes or IPs. Providers occasionally update their infrastructure, so always use their official include: for best practices.

Be vigilant for “Too many DNS lookups” errors, especially if your list of providers grows. If you near the lookup cap, consider consolidating services or using a managed SPF flattening solution. Keep SPF, DKIM, and DMARC policies synchronized, so at least one method will authenticate forwarded messages. As your email authentication stabilizes, you’ll be able to increase outbound volume smoothly. Proactive monitoring is especially important after you add v=spf1 records for Google Workspace or launch new domains and subdomains.

For more context on evolving delivery rules, read this backgrounder on the latest reasons for bounced emails and changes to delivery rules. It’s a valuable resource when refining SPF policy decisions.

Troubleshooting and alternatives

Issue: Multiple SPF records detected. Receivers return “PermError.” Combine all mechanisms within a single record and remove duplicates. Only one TXT should begin with v=spf1 per host. After consolidating, re-query DNS and retest until you see a pass. This mistake often happens when teams add v=spf1 records for Google Workspace without auditing legacy entries.

Issue: Too many DNS lookups. You have surpassed the limit of 10. Eliminate unused mechanisms and, where possible, replace broad a or mx mechanisms with specific ip4: or ip6: addresses. Evaluate whether overlapping tools can be consolidated, or use a provider that offers a single streamlined include.

Issue: Softfail or neutral on legitimate messages. Ensure every sender’s IP or service domain is listed. If a third party sends through their own servers, use their published include or IP block. Move from ~all to -all only when all intended senders consistently pass.

Issue: Forwarding breaks SPF. Forwarded mail often originates from the forwarder’s IP, not yours. Enable DKIM and keep it aligned for DMARC so messages can pass authentication even when SPF fails due to forwarding. SPF by itself cannot always handle all forwarding scenarios.

Issue: Subdomain mail fails. Publish SPF records explicitly on the subdomains that actually send mail. Root policies do not automatically apply. For instance, if promo.yourdomain.com sends out mail, give it its own record. This keeps your policies clear as you add v=spf1 records for Google Workspace to new mail streams.

Issue: Quotation or spacing errors. Some DNS portals require quotes, others do not. Avoid unwanted spaces, misplaced quotes, or trailing characters. Always use a validator to check syntax before and after saving.

Alternatives and deeper reading. If you manage a complex environment with many third-party vendors, consider a more structured approach to SPF includes and domain delegation. For an in-depth look at advanced techniques, see our comprehensive guide on SPF strategies and multi-domain setups. This resource explains when to isolate senders under subdomains and keep your records efficient as you scale up.

Conclusion and next steps

You’ve now completed a practical, step-by-step process to add v=spf1 records for Google Workspace, from initial planning to final verification. You mapped your senders, checked your DNS, selected the appropriate policy, published your TXT record, and validated the results. By maintaining a single, accurate record per host and keeping within the lookup limit, your domain clearly signals which senders are authorized. Regularly update your inventory, stay alert for provider changes, and adjust as needed. This upkeep pays off every time your emails hit the inbox.

If you experience repeated bounces after setup, revisit your DMARC and DKIM alignment, and double-check your list of authorized senders. For more information on delivery rule changes, check out email bounce guidelines and evolving criteria for delivery. These insights will help you refine your policy as you progress from ~all to -all, and as you add v=spf1 records for Google Workspace to new subdomains.

Would you like a second opinion on your email authentication setup, DNS configuration and message sending rate? Consult with an expert at MailAdept for a fast, thorough review of your SPF, DKIM, and DMARC configuration, and for practical guidance tailored specifically to your domain.

FAQ

What is SPF and why is it important?

SPF, or Sender Policy Framework, is a protocol that helps verify that emails sent from your domain are legitimate. It helps prevent fraud and increases email trustworthiness by specifying which mail servers are allowed to send on behalf of your domain.

How do I start implementing SPF for Google Workspace?

To implement SPF, you need to access your domain’s DNS settings and list all systems that send emails on your behalf. Getting this inventory allows you to create a comprehensive SPF record that accurately reflects your email environment.

What should I consider before creating an SPF record?

Before creating an SPF record, gather information about all email sources for your domain, including transactional tools and servers. Consider the current SPF records and understand the importance of DNS lookup limits to avoid errors.

How does the SPF policy end qualifier affect my emails?

The end qualifier in an SPF policy, typically ~all or -all, determines how strictly unauthorized emails are handled. Starting with a soft fail (~all) is recommended while ensuring all legitimate senders are added, before moving to a hard fail (-all) once confident in your settings.

Why do I need to check existing SPF records?

Checking existing SPF records is crucial to avoid having multiple records, which can cause email authentication errors. Consolidate your SPF mechanisms into a single, accurate record to ensure smooth verification.

How do you verify that your SPF implementation is working?

Once your SPF record is published, monitor its effectiveness by checking email headers for 'Received-SPF: pass' status in test emails. You can also use online SPF checkers to identify any configuration issues that might need correcting.

What steps should I take if SPF isn't functioning as expected?

If SPF isn’t working correctly, review and correct any DNS lookup errors, duplicate records, or omitted senders. Always ensure all authorized IPs and domains are included in the SPF record and validate with an SPF checker.