DNS Basics • Last Updated 5th April 2026 2 min read

What Is an SRV Record in DNS?

Learn what an SRV record is, how service, protocol, priority, weight, and port fields work, and when SRV lookups are useful in real deployments.

Tools For This Topic

What an SRV record does

An SRV record, or service record, tells clients where a specific service is hosted. Unlike a basic A or AAAA record, an SRV record includes not only the target hostname but also the port number and routing preferences for that service.

This makes SRV records useful when an application needs to discover the right endpoint automatically instead of assuming a default hostname or port.

What an SRV record looks like

_sip._tcp.example.com. 3600 IN SRV 10 20 5060 sip1.example.com.

The service label is _sip, the protocol is _tcp, the priority is 10, the weight is 20, the port is 5060, and the target hostname is sip1.example.com. Clients use those fields together to decide where to connect.

How the SRV fields work

  • Service identifies the application, such as _sip or _xmpp-server
  • Protocol usually identifies _tcp or _udp
  • Priority controls which target is preferred first, with lower values preferred
  • Weight helps distribute traffic among records with the same priority
  • Port tells the client which TCP or UDP port to use
  • Target identifies the hostname that actually provides the service

The target hostname must then resolve through A or AAAA records before the client can connect.

Where SRV records are commonly used

  • SIP and VoIP platforms
  • XMPP and other messaging services
  • Microsoft Active Directory service discovery
  • Custom internal applications that need service location
  • Systems where the service port is not implied by the hostname alone

SRV records are most valuable when the client software is designed to query them automatically. If an application ignores SRV discovery, publishing the record alone will not change where that application connects.

Common SRV record mistakes

  • Publishing the service at the wrong owner name, such as missing the protocol label
  • Pointing the target to a hostname that does not resolve
  • Using the wrong port number for the application
  • Assuming weight matters across different priorities
  • Testing the target host but forgetting that clients query the full SRV name

When SRV discovery fails, the issue is often not the SRV record itself but the target hostname or the application expecting a different service label.

How to validate SRV records

dig _sip._tcp.example.com SRV

dig _xmpp-server._tcp.example.com SRV

Related Articles