Glossary / DNS records

SRV record

An SRV record is a DNS record that tells clients which host and port provide a named service for a domain, such as SIP calling or XMPP chat. Its name combines the service and protocol, like _sip._tcp.example.com, and its value lists priority, weight, port and target host.

Copy the syntax

SRV record in a zone file

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

Fields: priority 10, weight 60, port 5060, target host.

Check it

dig _sip._tcp.example.com SRV +short

Returns priority, weight, port and target.

Have a name in mind?

.com $24.99 first year, renews at $24.99/yr. Other endings: not on sale yet.

In plain English

An SRV record tells apps which server and port run a service, such as calling or chat, for your domain.

What to do

  • Copy the service name, port and target exactly from your provider's guide.
  • Point the target at a hostname with an address record.
  • Check it with a DNS lookup after saving.
How a client uses an SRV recordSRV lookup: client queries _sip._tcp.example.com, gets host sip1 on port 5060, then its A record.1 · Ask_sip._tcp.example.comclient looks up service2 · SRV10 60 5060 sip1host and port3 · Addresssip1 A 192.0.2.70then connects
The client reads the host and port from the SRV record, then looks up that host's address.
Defined in
RFC 2782Source: RFC 2782
Type code
33Source: IANA
Service names
IANA service name and port registrySource: IANA
Target rule
Must be a hostname with A/AAAA, not a CNAMESource: RFC 2782
What is an SRV record used for?

SRV records let apps find a service without hard-coded ports. Calling systems, chat servers, some games and directory services use them. You add them when a provider’s setup guide lists SRV values.

What do priority and weight mean?

Clients try the lowest priority number first. Among records with the same priority, weight spreads the load: a record with weight 60 gets about three times the traffic of one with weight 20. Use higher priority numbers for backups.

SRV record examples

Example hosts (RFC 2606); ports from the IANA registry.
NamePriorityWeightPortTarget
_sip._tcp10605060sip1.example.com.
_sip._tcp10205060sip2.example.com.
_sip._tcp2005060backup.example.com.
_xmpp-client._tcp505222chat.example.com.

Questions about SRV record

How do I add an SRV record?

In your DNS editor, choose type SRV and fill the service and protocol name, such as _sip._tcp, then priority, weight, port and target. Some editors want the full name, others only the underscore labels.

Can an SRV target be a CNAME?

No. RFC 2782 says the target must be a hostname with its own address records. Point it at a name that has an A or AAAA record.

Do browsers use SRV records?

No. Web browsers ignore SRV records for ordinary HTTPS sites. SRV is used by other protocols, such as SIP and XMPP, whose clients are built to look it up.

What does a target of a single dot mean?

A target of . means the service is definitely not available at this domain. Clients should stop looking instead of trying defaults.

Put it to work on your own domain

See the first-year and renewal price before you pay.

.com first year$24.99, renews $24.99Check a domain
↑