Skip to main content

What is a DNS SRV record?

The DNS "service" (SRV) record specifies a host and port for specific services such as Voice over IP (VoIP), instant messaging, and more. While most DNS records only specify a server or an IP address, SRV records are unique because they include a port at that IP address as well.

Certain Internet protocols require the use of SRV records to function correctly.


What is a Port?

In networking, ports are virtual places that designate which processes network traffic should go to within a computer. Ports allow computers to differentiate between different types of traffic:

  • VoIP streams go to a different port than email messages, even if they arrive over the same internet connection.
  • Just like IP addresses, all ports are assigned a specific number.

Protocols such as IMAP, SIP, and XMPP need to connect to a specific port in addition to a specific server. SRV records are the mechanism used to specify these ports within the DNS.

[Image of network ports and protocols mapping]


What goes in an SRV record?

An SRV record contains several fields of information. Below is a breakdown of the components:

FieldExample ValueDescription
ServiceXMPPThe symbolic name of the desired service.
ProtoTCPThe transport protocol (usually TCP or UDP).
Nameexample.comThe domain name to which this record refers.
TTL86400Time to Live (in seconds).
ClassINInternet class (standard).
TypeSRVRecord type.
Priority10Priority of the target host.
Weight5Relative weight for records with the same priority.
Port5223The TCP or UDP port on which the service is found.
Targetserver.example.comThe canonical hostname of the machine providing the service.

Standard Format

SRV records are formatted in this specific sequence: _service._proto.name. TTL class type priority weight port target.

Actual Example: _xmpp._tcp.example.com. 86400 IN SRV 10 5 5223 server.example.com.

Note: SRV records must point directly to an A record or an AAAA record. The target cannot be a CNAME.


Priority vs. Weight: Understanding the Difference

SRV records allow administrators to balance traffic across multiple servers using two values: Priority and Weight.

[Image of DNS load balancing using SRV priority and weight]

1. Priority (Looked at first)

The server with the lower priority value is tried first.

  • Example: If Server A has priority 10 and Server B has priority 20, the service will always query Server A first.

2. Weight (Tie-breaker)

Weight is used to distribute traffic among servers with the same priority.

  • Example: If Servers A, B, and C all have priority 10, but Server A has a weight of 5, Server B has 3, and Server C has 2:
    • Server A will receive approximately 50% of the traffic.
    • Server B will receive 30%.
    • Server C will receive 20%.

Optimizing Modern Communications

In 2026, SRV records are critical for businesses using integrated communication suites and VoIP. Ensuring these records are accurately configured is a hallmark of a Reliable Email Provider and a robust digital infrastructure, especially for companies scaling across global markets.

Would you like me to help you generate a specific SRV record for a service like Microsoft Teams or a custom SIP provider?