What is an SRV Record?
An SRV (Service) record specifies the location — hostname and port — of servers for specific services. It allows service discovery via DNS, meaning software can automatically find where a service lives without hardcoding servers or ports. SRV records are used for things like SIP (VoIP), XMPP (chat), Minecraft servers, and Microsoft Teams/Office 365 integration.
SRV Record format
_service._proto.name. TTL IN SRV priority weight port target. # Example: SIP over TCP _sip._tcp.example.com. 3600 IN SRV 10 20 5060 sipserver.example.com. # ^ ^ ^ ^ # | | | hostname # | | port # | weight (load balancing) # priority (lower = preferred)
SRV Record Fields Explained
- ▸_service: The symbolic name of the service (e.g.,
_sip,_xmpp,_minecraft) - ▸_proto: Protocol —
_tcpor_udp - ▸Priority: Lower value = higher priority. Clients try lowest priority first.
- ▸Weight: Used for load balancing among records with the same priority. Higher weight = more traffic.
- ▸Port: The port number the service listens on (e.g., 5060 for SIP, 25565 for Minecraft)
- ▸Target: The hostname of the server running the service. Must have an A/AAAA record.
Real-World Examples
Microsoft 365 / Teams
Microsoft 365 SRV records
# Lync/Teams SIP Federation _sipfederationtls._tcp.yourdomain.com. SRV 100 1 5061 sipfed.online.lync.com. # Lync/Teams SIP _sip._tls.yourdomain.com. SRV 100 1 443 sipdir.online.lync.com.
Minecraft Server Discovery
Minecraft SRV record
# Lets players connect to "play.yourdomain.com" instead of "yourdomain.com:25565" _minecraft._tcp.play.yourdomain.com. SRV 0 5 25565 mc.yourserver.com.
XMPP (Jabber/Chat)
XMPP SRV records
_xmpp-client._tcp.yourdomain.com. SRV 5 0 5222 xmpp.yourdomain.com. _xmpp-server._tcp.yourdomain.com. SRV 5 0 5269 xmpp.yourdomain.com.
Note: SRV records only work if the client application supports SRV lookups. Web browsers don't use SRV records — they're for application-level protocols.
Common Mistakes
- ▸Setting target to an IP address instead of a hostname
- ▸Forgetting that the target hostname needs its own A record
- ▸Incorrect service/protocol names — check your application's documentation for the exact strings
- ▸Setting weight to 0 when you want load balancing (weight 0 means rarely used as backup)