When configuring Sender Policy Framework (SPF) records, you might encounter two similar but technically different syntax patterns for Google's SPF includes:
v=spf1 include:_spf.google.com ~all
v=spf1 include:spf.google.com ~all
Google's current recommendation uses the underscore prefix in their documentation for Workspace/Gmail SPF records:
v=spf1 include:_spf.google.com ~all
This is the canonical format that Google maintains and updates for their email services.
The version without underscore (spf.google.com
) was used in earlier implementations but has been deprecated in favor of the standardized _spf
prefix. Both records currently resolve to the same IP ranges, but:
_spf.google.com
follows modern DNS naming conventions- The underscore prefix helps distinguish SPF-specific records from other DNS entries
For production environments, always use:
v=spf1 include:_spf.google.com ~all
This ensures compatibility with future Google infrastructure changes and follows current Internet standards.
Here's a complete SPF implementation including Google and other common email services:
v=spf1 include:_spf.google.com
include:servers.mcsv.net
include:spf.protection.outlook.com
include:_spf.salesforce.com
~all
Always validate your SPF records using tools like:
nslookup -type=txt yourdomain.com
dig yourdomain.com txt
Or online SPF checkers that can verify the entire SPF evaluation chain.
In SPF (Sender Policy Framework) records, the difference between include:_spf.google.com
and include:spf.google.com
comes down to domain naming conventions rather than functional differences in the SPF protocol itself. Both are valid SPF mechanisms, but they may point to different DNS records based on organizational preferences.
Here's how these would appear in actual DNS TXT records:
; Example 1 (Underscore prefix)
example.com. IN TXT "v=spf1 include:_spf.google.com ~all"
; Example 2 (No underscore)
example.com. IN TXT "v=spf1 include:spf.google.com ~all"
When implementing SPF records:
- Google actually uses
_spf.google.com
as their canonical SPF record - The underscore prefix is sometimes used to distinguish SPF-specific subdomains
- Both formats will work if the corresponding DNS record exists
You can verify both versions using command line tools:
dig TXT _spf.google.com +short
dig TXT spf.google.com +short
As of current Google's configuration, only the underscore version returns an actual SPF record.
When including third-party SPF records:
- Always check the provider's documentation
- Verify the DNS records exist before implementation
- Be consistent with the provider's preferred naming convention
- Remember that SPF has a 10-lookup limit for includes