How do I add a TXT record to my domain for SPF?

Assuming my domain is example.com and my mail server is called mail.example.com and my web server is called www.example.com,


I want to add an SPF record to my domain. E.g. "v=spf1 a:mail.example.com -all”


The Server.app is not showing me options to add a TXT record to the domain itself. It only supports this for hosts.


Can I just add one to the file /Library/Server/named/db.example.com? Server.app doesn't overwrite that?

iMac, macOS Sierra (10.12.4), Core i7, 27"

Posted on Oct 15, 2017 3:18 AM

Reply
3 replies

Oct 16, 2017 5:26 AM in response to Gerben Wierda

Your right in this case Server.app does not make it possible to add the needed record, here is how to do it.


  1. Launch Server.app
  2. Temporarily turn off the DNS server
  3. Launch Terminal.app
  4. edit /Library/Server/named/db.example.com
  5. insert a line as follows


10800 IN TXT "v=spf1 a:mail.example.com -all"


Note: The above is your example SPF record and is a very basic one, in reality you might want more options in it.


Then save the changes, and use Server.app to start the DNS server up again.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I add a TXT record to my domain for SPF?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.