The short answer

An SRV record, defined in RFC 2782, tells a client which host and port provide a service for a domain. Clients that support it, such as SIP phones, XMPP chat, LDAP and Kerberos clients and Microsoft Active Directory, look it up instead of needing a server name typed in.

$ dig +short SRV _sips._tcp.example.com
10 60 5061 sip1.example.com.
10 40 5061 sip2.example.com.
20 0 5061 sip-backup.example.net.

The name is _service._protocol.domain, and each answer gives a priority, a weight, a port and a target host.

Reading the fields

FieldMeaningIn the example
PriorityLower values are tried first. Higher values are fallbacks.sip1 and sip2 first, sip-backup only if both fail
WeightShares load among targets with the same priorityAbout 60% of clients pick sip1, 40% sip2
PortThe TCP or UDP port of the service5061, SIP over TLS
TargetThe host name to connect toMust have A or AAAA records; must not be a CNAME

A target of . means the service is deliberately not offered at this domain.

Enterprise records you will meet

NameUsed by
_ldap._tcp.dc._msdcs.example.comWindows clients finding Active Directory domain controllers
_kerberos._tcp.example.com, _kerberos._udp.example.comKerberos clients finding a KDC
_sip._tls.example.com, _sipfederationtls._tcp.example.comMicrosoft-specific SIP client and federation discovery, including older Skype for Business setups; standard SIPS discovery uses _sips._tcp.example.com (RFC 3263)
_autodiscover._tcp.example.comOutlook finding an Exchange Autodiscover endpoint when the usual host names are not available
_xmpp-client._tcp.example.comXMPP chat clients
_caldavs._tcp.example.com, _carddavs._tcp.example.comCalendar and contacts clients (RFC 6764)

Records for Active Directory usually belong in internal DNS only. Publishing them in public DNS reveals domain controller names and does nothing useful for outside clients.

Common mistakes

  • A target that is a CNAME or an IP address. RFC 2782 requires a host name with address records.
  • A target that no longer exists after a server was retired.
  • Wrong service or transport label. Standard SIP over TLS uses _sips._tcp; _sip._tls is a Microsoft-specific convention, not the standard TLS transport label.
  • All targets at the same priority with weight 0 when you meant to send most traffic to one server.

How DNS Panopticon helps

Domain Visualizer's Advanced scan looks up five SRV names: _sip._tcp, _sip._tls, _autodiscover._tcp, _ldap._tcp and _kerberos._tcp, and shows any it finds with the rest of the records. Other service names, including standard _sips._tcp, are not queried; test those separately with dig. In a zone export, Zone Analyzer can filter on the SRV type to list them all.

Sources and further reading