Establishing best practices for SPF records, while avoiding CNAMES, is vital for secure and successful email authentication. SPF records, configured as TXT records within DNS, authorize mail servers, preventing spoofing. The correct syntax of SPF records is crucial for validity and proper functionality, using terms like 'v=spf1', 'ip4:', and 'include:'. It's recommended to carefully assess all email sources for inclusion in the SPF record. A consensus exists that using CNAMES should be avoided, in favor of A or AAAA records, because of security and management implications. Regularly review and update SPF records to account for infrastructure or service changes. Experts recommend SPF flattening and diligently managing 'include' mechanisms to remain within the DNS lookup limit of 10 and avoid evaluation failures. Furthermore, testing using validation tools to assess SPF syntax and DNS lookups is crucial. For comprehensive security, implementing DMARC in conjunction with SPF is recommended.
9 marketer opinions
Best practices for SPF records and avoiding CNAMES revolve around maintaining accurate, validated, and well-structured SPF records to ensure proper email authentication and deliverability. Key aspects include avoiding unnecessary inclusions, keeping records updated, utilizing subdomains effectively, testing records, and understanding the limitations of SPF alone, often requiring DMARC for full protection. Avoiding CNAMES is a consensus and is generally invalid.
Marketer view
Email marketer from Email on Acid recommends using tools to test your SPF records. A good tool is able to help you avoid common mistakes, and gives an output of the SPF including if it is valid.
26 May 2024 - Email on Acid
Marketer view
Email marketer from SparkPost warns against common SPF mistakes, such as having multiple SPF records (which invalidates the record) and using the 'ptr' mechanism (which is unreliable). They emphasize the importance of testing your SPF record.
29 Sep 2022 - SparkPost
5 expert opinions
Experts emphasize the importance of carefully managing SPF records for email security and avoiding potential issues. Key practices include avoiding the use of CNAMEs, regularly auditing SPF configurations, and using dedicated IPs for more secure publishing. SPF is critical, but often misconfigured. It's vital to understand the implications of each mechanism included in the record. Readily available online validators should be used to check for syntax errors and DNS lookup issues.
Expert view
Expert from Email Geeks explains CNAMES are easy for the provider to manage, meaning they don't have to keep bothering their users to update things if the provider needs to be moving things around.
21 Aug 2021 - Email Geeks
Expert view
Expert from Email Geeks started recommending NOT using CNAMES a few years ago to avoid potential problems and asking for trouble. This situation is worse than anticipated.
19 Apr 2025 - Email Geeks
5 technical articles
SPF records, implemented as TXT records in DNS, are critical for authorizing email sending servers and preventing spoofing. Proper syntax (e.g., 'v=spf1', 'ip4:', 'include:', '-all') is essential. You should evaluate all sending sources and include them in the record. It is important to keep your record simple and test it. SPF flattening is a strategy used to consolidate 'include' statements and avoid exceeding the DNS lookup limit of 10, beyond which SPF checks may fail. RFC 7208 defines the official SPF syntax and mechanisms.
Technical article
Documentation from Microsoft Learn shares that SPF records in Office 365 can help prevent spoofing. They note that you should evaluate all your sending sources and include them in your SPF record. They recommend starting with a simple record and testing.
7 Apr 2023 - Microsoft Learn
Technical article
Documentation from DMARC.org describes SPF flattening as a process to consolidate multiple 'include' statements within an SPF record to stay within the DNS lookup limit of 10. It is noted that exceeding this limit can cause SPF checks to fail.
16 Apr 2025 - DMARC.org
Can a sender modify SPF records to alter SPF checking behavior?
How can I optimize my SPF record to stay within the lookup limit when using multiple email sending services?
How do CNAME records affect DNS records like SPF, DKIM, DMARC, and MX?
How do I properly set up SPF and DKIM records for email marketing, including handling multiple SPF records, IP ranges, bounce capturing, and Google Postmaster Tools verification?
How do I set up an SPF record when using multiple email sending services?
How do SPF records and DKIM keys work with multiple email services like Klaviyo and Shopify?