There is a dedicated DNS SPF record which can be used for SPF record. However DNS TXT record may also be used for backwards compatibility.
If i CAN define SPF record - should i just delete the deprecated TXT record or leave it?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityActually following RFC 7208, section 3.1. you should only be using the TXT type record:
SPF records MUST be published as a DNS TXT (type 16) Resource Record (RR) [RFC1035] only. The character content of the record is encoded as [US-ASCII]. Use of alternative DNS RR types was supported in SPF's experimental phase but has been discontinued.
The SPF RR type has been deprecated by the SPFbis working group in April 2014. Reasoning for this can also be found in RFC 7208, section 3.1., which obsoletes the older RFC 4408:
In 2003, when SPF was first being developed, the requirements for assignment of a new DNS RR type were considerably more stringent than they are now. Additionally, support for easy deployment of new DNS RR types was not widely deployed in DNS servers and provisioning systems. As a result, developers of SPF found it easier and more practical to use the TXT RR type for SPF records.
I chose to leave mine. It doesn't cost anything, and may continue to work.
Revisit this in a few years when more servers/clients have updated, and if you can, see who is asking for the TXT record perhaps.
RFC 7208 is a bad proposal that should not be adopted. Today ( 2019), my DNS servers still see queries for SPF type 99 records, so clearly there are other people who ignore the incorrect conclusions reached in that RFC and in 6686.