What Is an SRV Record? Service Location in DNS Explained

· Unified DNS Team · 7 min read

What Is an SRV Record?

An SRV record (Service record) specifies the location of servers for specific services. Unlike A records that simply map hostnames to IPs, SRV records tell applications which server handles a particular service, along with the port, priority, and weight.

The Basics

Why SRV Records Exist

Before SRV records, applications needed hardcoded server addresses. SRV records provide:

SRV Record Structure

The Name Format

SRV record names follow a specific pattern: _service._protocol.domain.

Examples:

Record Components

_sip._tcp.example.com.    3600    IN    SRV    10 60 5060 sipserver.example.com.
ComponentValueDescription
**Name**_sip._tcp.example.comService and protocol
**TTL**3600Time To Live
**Priority**10Lower = higher priority
**Weight**60Load balancing within priority
**Port**5060TCP/UDP port number
**Target**sipserver.example.comServer hostname

Priority vs Weight

Priority determines failover order (like MX records):

; Primary server (tried first)
_sip._tcp.example.com.    SRV    10 50 5060 sip1.example.com.

; Backup server (tried if primary fails)
_sip._tcp.example.com.    SRV    20 50 5060 sip2.example.com.

Weight distributes load within the same priority:

; 70% of traffic to sip1, 30% to sip2
_sip._tcp.example.com.    SRV    10 70 5060 sip1.example.com.
_sip._tcp.example.com.    SRV    10 30 5060 sip2.example.com.

Common SRV Records

SIP (VoIP/Telephony)

; SIP over UDP
_sip._udp.example.com.    3600    IN    SRV    10 100 5060 pbx.example.com.

; SIP over TCP
_sip._tcp.example.com.    3600    IN    SRV    10 100 5060 pbx.example.com.

; SIP over TLS
_sips._tcp.example.com.   3600    IN    SRV    10 100 5061 pbx.example.com.

XMPP (Jabber/Chat)

; Client connections
_xmpp-client._tcp.example.com.    3600    IN    SRV    10 100 5222 xmpp.example.com.

; Server-to-server connections
_xmpp-server._tcp.example.com.    3600    IN    SRV    10 100 5269 xmpp.example.com.

LDAP (Directory Services)

; LDAP service
_ldap._tcp.example.com.    3600    IN    SRV    10 100 389 ldap.example.com.

; LDAP over SSL
_ldaps._tcp.example.com.   3600    IN    SRV    10 100 636 ldap.example.com.

Kerberos (Authentication)

; Kerberos KDC
_kerberos._tcp.example.com.     3600    IN    SRV    0 100 88 kdc.example.com.
_kerberos._udp.example.com.     3600    IN    SRV    0 100 88 kdc.example.com.

; Kerberos password change
_kpasswd._tcp.example.com.      3600    IN    SRV    0 100 464 kdc.example.com.
_kpasswd._udp.example.com.      3600    IN    SRV    0 100 464 kdc.example.com.

CalDAV/CardDAV (Calendar/Contacts)

; CalDAV (calendar sync)
_caldavs._tcp.example.com.    3600    IN    SRV    10 100 443 caldav.example.com.

; CardDAV (contact sync)
_carddavs._tcp.example.com.   3600    IN    SRV    10 100 443 carddav.example.com.

Microsoft 365 SRV Records

Microsoft 365 uses SRV records for Skype for Business/Teams interoperability and autodiscovery.

Skype for Business / Teams Federation

; SIP federation
_sipfederationtls._tcp.example.com.    3600    IN    SRV    100 1 5061 sipfed.online.lync.com.

; SIP TLS
_sip._tls.example.com.                  3600    IN    SRV    100 1 443 sipdir.online.lync.com.

Complete Microsoft 365 DNS Setup

; MX record
example.com.    MX    0 example-com.mail.protection.outlook.com.

; Autodiscover
autodiscover.example.com.    CNAME    autodiscover.outlook.com.

; SRV records for Skype/Teams
_sipfederationtls._tcp.example.com.    SRV    100 1 5061 sipfed.online.lync.com.
_sip._tls.example.com.                  SRV    100 1 443 sipdir.online.lync.com.

; SPF
example.com.    TXT    "v=spf1 include:spf.protection.outlook.com -all"

; DKIM
selector1._domainkey.example.com.    CNAME    selector1-example-com._domainkey.example.onmicrosoft.com.
selector2._domainkey.example.com.    CNAME    selector2-example-com._domainkey.example.onmicrosoft.com.

; DMARC
_dmarc.example.com.    TXT    "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"

Best Practices for MSPs

1. Verify Application Support

Not all applications use SRV records. Before configuring:

2. Always Include A Records for Targets

SRV targets must resolve:

; SRV record
_sip._tcp.example.com.    SRV    10 100 5060 pbx.example.com.

; Required A record for target
pbx.example.com.          A      198.51.100.25

3. Plan for Redundancy

Use priority and weight for high-availability services:

; Primary site (priority 10)
_sip._tcp.example.com.    SRV    10 50 5060 pbx1.example.com.
_sip._tcp.example.com.    SRV    10 50 5060 pbx2.example.com.

; DR site (priority 20)
_sip._tcp.example.com.    SRV    20 100 5060 pbx-dr.example.com.

4. Document Non-Standard Ports

SRV records often use non-standard ports. Document:

5. Monitor SRV Resolution

Include SRV records in your monitoring:

# Test SRV lookup
dig _sip._tcp.example.com SRV

# Verify target resolves
dig pbx.example.com A

Frequently Asked Questions

Do all applications use SRV records?

No. Applications must be specifically designed to perform SRV lookups. Many modern protocols support SRV (SIP, XMPP, LDAP), but web browsers don't use them for HTTP/HTTPS.

What happens if no SRV record exists?

Application behavior varies. Some fall back to A record lookups with standard ports, others fail. Check your specific application's documentation.

Can I use SRV records for web services?

While technically possible, web browsers don't perform SRV lookups. For web services, use A/CNAME records instead.

What's the difference between SRV priority and MX priority?

They work the same way — lower numbers indicate higher priority. The difference is SRV records also include weight for load balancing within the same priority level.

How do I test if SRV records are working?

# Query SRV record
dig _service._protocol.example.com SRV

# Or use nslookup
nslookup -type=SRV _sip._tcp.example.com

Then test the actual application to verify it discovers the service correctly.


Get Started with Unified DNS

SRV records are essential for many business services. Unified DNS lets you view, modify, audit, and backup all DNS record types across multiple providers — with automated backups and Hudu syncing to keep your documentation current.

Unified DNS is live — try it free for a month with code FREETRIAL2026 at billing setup. No commitment. Or request a demo for a walkthrough.