SRV record
An SRV (Service) record advertises the hostname and port number of a specific service for a given protocol and domain, letting clients discover where a service lives without hard-coded port numbers or CNAMEs.
In plain English
If you run an XMPP, SIP, LDAP, or Microsoft Active Directory service, clients should not have to guess the hostname and port. They look up an SRV record like _xmpp-client._tcp.example.com, which says "talk to chat.example.com on port 5222." That is service discovery via DNS.
How it works
SRV is defined in RFC 2782 with type code 33. The owner name follows the pattern _service._proto.name (e.g. _sip._tls.example.com). The rdata has four fields: priority (lower wins), weight (load-share among equal priorities), port, and target (a hostname that must have A/AAAA records — not a CNAME). Clients select the lowest-priority entry, then choose randomly among same-priority entries proportionally to their weight, then connect to target:port. SRV is mandatory for several protocols (XMPP, Kerberos, LDAP in AD environments) and optional for many others. Web traffic historically ignored SRV; the modern HTTPS and SVCB record types in RFC 9460 fill that gap with a richer model (including ALPN and ECH hints).
Related terms
- DNS — base protocol
- A record — what SRV targets must resolve to
- AAAA record — same, for IPv6
- CNAME — forbidden as an SRV target
- MX record — similar priority/weight model
- TXT record — frequently paired with SRV for metadata
SecDNS perspective
SecDNS authoritative hosting accepts SRV records with the proper _service._proto naming, validates targets against your zone's A/AAAA, and warns if a target is a CNAME.