SPF (Sender Policy Framework) TXT records are essential DNS entries that specify authorized mail servers for a domain, always beginning with "v=spf1" and utilizing mechanisms like "include" to delegate trust to third-party sending services. A critical constraint for SPF records is the 10-DNS lookup limit, where each "include" mechanism and certain other lookups count towards this total. Exceeding this limit causes SPF validation failures, impacting email deliverability. To circumvent this, strategies such as consolidating "include" statements, utilizing SPF flattening services, or leveraging DMARC for policy enforcement are recommended. While individual TXT record strings have a 255-character limit, longer SPF records can be split into multiple quoted strings within one TXT record; however, this does not alleviate the distinct 10-DNS lookup constraint. It is also important to consider existing SPF management systems and avoid using TXT records for purposes better suited to CNAMEs, such as Google authentication.
10 marketer opinions
When constructing SPF TXT records, precise formatting is essential to ensure proper email authentication. These records must start with 'v=spf1' and use spaces to delineate various mechanisms, such as 'include' for third-party sending services. A key aspect of managing SPF records involves navigating the strict 10-DNS lookup limit, a threshold that counts each 'include' mechanism and other DNS-querying lookups. Exceeding this limit causes SPF validation failures, impacting deliverability. Strategies to mitigate this include consolidating 'include' statements or employing SPF flattening services. While DNS TXT records can be split into multiple strings for length, and some large records might trigger UDP packet size warnings, these are often less critical than the lookup limit due to TCP retries. Additionally, it is advisable to use CNAMEs instead of TXT records for purposes like Google authentication to avoid 'polluting' DNS entries and potential conflicts with SPF management, especially when integrating with existing 'magic' SPF systems.
Marketer view
Email marketer from Email Geeks explains that SPF records use spaces to separate "things" and that each domain generally needs its own "include:" mechanism, which should be provided by the vendor. He clarifies that underscores in domain names are not special SPF formatting. He advises checking with "magic" SPF systems like Ondmarc before directly adding includes to avoid future conflicts, though temporary additions are acceptable if removed later. He also notes that while oversized TXT records can cause DNS truncation and TCP retries, this is often not a significant operational risk.
6 Feb 2025 - Email Geeks
Marketer view
Email marketer from Email Geeks explains that exceeding the 512-byte UDP packet size limit for DNS TXT records can cause malformed message warnings and issues, despite retries over TCP. He advises against using TXT records for Google authentication and recommends CNAMEs instead to prevent "polluted" TXT records that can break lazy email admin checks. He also notes that the "ondmarc.com" include specifically mentioned in the user's setup appears broken.
29 Apr 2023 - Email Geeks
3 expert opinions
Email deliverability relies on properly configured SPF TXT records, which authorize specific mail servers to send on behalf of a domain. These records consistently begin with 'v=spf1' and utilize various mechanisms, including 'include' to delegate sending authority to third-party services. A crucial challenge for SPF records is the strict 10-DNS lookup limit; every 'include' mechanism and other DNS-querying mechanisms count towards this total. Going beyond this threshold results in SPF validation failure, manifesting as a 'PermError,' which severely affects email deliverability. To circumvent this, email senders can leverage SPF flattening services that consolidate all included domains and IP addresses into a single record, effectively bypassing the lookup constraint. Alternatively, minimizing the number of 'include' mechanisms or manually consolidating authorized IPs can help maintain compliance.
Expert view
Expert from Word to the Wise explains that an SPF (Sender Policy Framework) TXT record is a DNS entry that specifies which mail servers are authorized to send email on behalf of a domain. The record always starts with v=spf1, followed by mechanisms like a, mx, ip4, and include to list authorized sending sources, and ends with a qualifier such as ~all (softfail) or -all (hardfail) to indicate how receiving servers should treat unauthorized emails.
31 May 2023 - Word to the Wise
Expert view
Expert from Word to the Wise shares that SPF records are limited to 10 DNS lookups, and each include: mechanism contributes to this limit. Exceeding this limit can cause SPF validation to fail, impacting email deliverability. To avoid this, SPF flattening services can be used, which resolve all included domains and IP addresses into a single, consolidated SPF record, effectively reducing the number of lookups and ensuring compliance with the 10-lookup rule.
11 Oct 2024 - Word to the Wise
5 technical articles
Properly formatting SPF TXT records is fundamental for email authentication, ensuring only authorized servers send mail on behalf of your domain. These essential DNS entries always begin with 'v=spf1' and utilize mechanisms like 'include' to designate trust to third-party email services, such as those from Mailchimp, Google Workspace, or Microsoft 365. While the primary function is to list legitimate sending sources, a critical constraint is the 10-DNS lookup limit, as defined by RFC 7208. Each 'include' statement and other DNS-querying mechanisms count towards this total, and exceeding it results in SPF validation failures, negatively impacting deliverability. Although individual TXT record strings have a 255-character limit and can be split into multiple quoted sections, this formatting technique does not circumvent the separate, more impactful 10-lookup constraint.
Technical article
Documentation from Mailchimp explains that SPF records are TXT records that start with "v=spf1", include specific domains like "include:servers.mcsv.net", and often end with "?all" to define how non-compliant emails should be handled.
17 Mar 2025 - Mailchimp
Technical article
Documentation from Google Workspace Admin Help shares that an SPF record begins with "v=spf1" and typically includes "include:_spf.google.com" for Google's mail servers, along with a mechanism like "~all" to define the policy for unlisted senders, indicating how to format the record for proper email authentication.
17 Jan 2023 - Google Workspace Admin Help
How can I optimize my SPF record to stay within the lookup limit when using multiple email sending services?
How to fix SPF record exceeding DNS lookup limit?
What are the best practices for using SPF flatteners and managing SPF records?
What are the best tools and practices for consolidating SPF records?
What are the options for dealing with overstuffed SPF records exceeding DNS lookup limits?
What causes DKIM key issues when DNS provider limits TXT record length?