SRV Record
Service Locator
- Type code
- 33
- Status
- In use
- Defined in
- RFC 2782
What the SRV record is for
An SRV record lives at a name of the form _service._proto.domain (for example _xmpp-server._tcp.jabber.org) and tells clients which host and port provide that service.
Clients try the records with the lowest priority first. Among records with the same priority, they spread connections in proportion to the weights. A target of "." means the service is not available at this domain.
SRV is used by XMPP, SIP, LDAP, Kerberos, Minecraft and other protocols. Web browsers do not use SRV for HTTP; HTTPS records fill that role.
Wire format and fields
| Field | Size | Meaning |
|---|---|---|
| Priority | 16 bits | Clients try lower values first. |
| Weight | 16 bits | Relative share of traffic among records with the same priority. |
| Port | 16 bits | The port the service listens on at the target. |
| Target | domain name | The host providing the service. Must not be an alias. "." means no service. |
Zone file syntax
_<service>._<proto>.<name> <ttl> IN SRV <priority> <weight> <port> <target>
Example
The SRV record at _xmpp-server._tcp.jabber.org, fetched from live DNS on 27 November 2026:
_xmpp-server._tcp.jabber.org. 60 IN SRV 30 30 5269 scarlet.jabber.org.
Common mistakes
- Pointing Target at a CNAME. RFC 2782 says the target must not be an alias.
- Putting an IP address in Target instead of a host name with A or AAAA records.
- Leaving out the underscores or the protocol label (writing xmpp-server.tcp.example.com), so clients never find the record.
- Expecting weight to work across priorities. Weight only splits traffic among records with the same priority.
Specifications
- RFC 2782: A DNS RR for specifying the location of services (DNS SRV)
- RFC 6335: Internet Assigned Numbers Authority (IANA) Procedures for the Management of the Service Name and Transport Protocol Port Number Registry (Makes the IANA service name registry the source of _service labels.)
- RFC 8553: DNS Attrleaf Changes: Fixing Specifications That Use Underscored Node Names (Updates how the underscored _service._proto labels are registered.)
- IANA DNS Resource Record (RR) TYPEs registry: type code and status
Related record types
Domain Intelligence APIs
Get started with our easy-to-use API docs.