What is an SRV record?

An SRV record tells clients which host and port provide a particular service for a domain, together with a priority and a weight for choosing between several servers.

An SRV record is published at a name of the form _service._protocol.domain, for example _sip._tcp.example.com. Its value has four parts: priority, weight, port and target hostname. Clients contact the lowest priority first; among records with the same priority, the weight decides what share of the traffic each one receives.

Because the record includes the port, a service can run on a non-standard port without users having to know it. SRV is used by protocols such as SIP, XMPP, LDAP and by some collaboration and game services. Web browsers do not use SRV records for HTTP, which is why a website cannot be moved to another port this way.

As with MX records, the target must be a hostname with its own address records, not a CNAME.

Example

_sip._tcp.example.com.  3600  IN  SRV  10 60 5060 sip1.example.com.
;                                       priority weight port target

Check it

See how SRV record looks for a real domain:

DNS lookup