Skip to content
inetGeek

SRV record

SRV

An SRV record publishes where a particular service runs — including its port, which no other record type carries.

01.

What an SRV record carries

An SRV record, defined in RFC 2782, names the host and port for a specific service. It is the only common record type that includes a port number, which is why protocols that do not use a fixed port rely on it.

The record name encodes the service and protocol as underscore-prefixed labels: _sip._tcp.example.com. The underscores prevent collisions with real hostnames.

02.

What an SRV record looks like

The value carries four fields in a fixed order — priority, weight, port, target: _sip._tcp.example.com. 3600 IN SRV 10 60 5060 sipserver.example.com.

Here the client should try sipserver.example.com on port 5060, at priority 10 and weight 60. The target is a hostname needing its own address record, and a single dot in that position means the service is explicitly not offered.

Because the name itself is part of the lookup, an SRV query for a wrongly assembled name fails quietly rather than loudly. The answer is an ordinary empty one, indistinguishable from a service that was simply never published.

03.

Priority and weight

Each record carries a priority and a weight. Priority works like MX: lower numbers are tried first. Weight distributes traffic among records that share a priority, in proportion to the weight values.

A client is expected to honour both. This gives finer control than MX records, which have priority but no weight.

How clients split traffic_sip._tcp.example.com

Records

10sip1.example.com
10sip2.example.com
10sip3.example.com
20backup.example.com

Share of new connections

Illustrative records. Priority orders the tiers; within a tier, weight sets each target's share of new connections. A weight of zero is tried only when every weighted target is exhausted.
04.

Where you will meet it

SRV records are used by SIP, XMPP, Minecraft servers, Microsoft Active Directory and various autoconfiguration mechanisms.

Email does not use SRV for delivery — that is what MX is for. Some mail clients do use SRV records to discover submission and IMAP settings automatically, which is a different job.

Related records

When these numbers change, hear about it. Sources are re-checked monthly; a repricing goes out as a short note.

Confirm by email; unsubscribe from any issue. Your address goes to Kit and nowhere else — what we do with it.

Every page here is sourced and dated.