How can I create a TXT record in OS X Server 4’s DNS? I need it for the Caching service with multiple public IPs, but the interface is unclear and there’s no obvious TXT record option. The Text field in other records is confusing, and I can’t find the BIND config—/var/named/ is gone.
Apple does not support this basic DNS feature primarily because it aims to simplify server management and make it more suitable for ordinary users.
However, you can use the command-line serveradmin to add TXT records, which allows you to bypass the limitations of the graphical interface and achieve more flexible and advanced configurations.
- Open Terminal and enter the following command to check the DNS settings:
sudo serveradmin settings dns - Add a TXT record:
sudo serveradmin command dns:addRecord _array_index=0 recordType=TXT zoneName=example.com recordName=_txt recordData="\"content\"" - Restart the DNS service:
sudo serveradmin stop dns - Verify if the TXT record was added successfully by querying:
dig TXT _txt.example.com