SRV Records
From Davical
SRV Records with DNSMasq
There's a write-up of this with DNSMasq on my blog:
http://andrew.mcmillan.net.nz/blog/srv_records_with_dnsmasq
We need to transfer some of that content here, and also provide some more recipes for Bind & other DNS servers as well...
SRV Records with Bind
There's a good summary here, though it kind of expects you already know a bit about Bind:
For a carddav the SRV record would look something like:
_carddavs._tcp.example.com. SRV 10 5 8443 carddav.example.com.
For a https CardDAV service with priority 10, weight 5 on port 8443 of carddav.example.com.