SRV records

Last change on 2022-10-26 • Created on 2020-04-01 • ID: DN-02E9A

Service records (or SRV records for short) enable you to redirect services (like SIP services used for VOIP, IM, and others involved in Internet telephony) to different locations. Simply put, they work by pointing one domain to a different domain name using a designated destination port. The SRV record specifies the priority, weight, port, and target for the SIP service.

SRV records may look a bit strange to you at first because they use underscores _ and dots . between some of the information they contain. And they may differ from each other a bit depending on your settings and your provider.

At the very beginning is an understore. Then the name of the service and a dot. Then another underscore. Then the protocol and another dot. Then the name of the domain. After that you may see the TTL (time to live), the letters IN SRV, the priority value, the weight value, and the port number. At the end, you'll see hostname of the machine that provides the service (the target where the SRV record points to) and another dot at the very end.

For example:

_sip._tcp.your-domain.com. 3600 IN SRV 10 60 5060 bigbox.example.com.

SRV structure

Service Protocol Domain TTL SRV Priority Weight Port Target
_sip _tcp your-domain.com. 3600 IN SRV 10 60 5060 example.your-domain.com

Service

The symbolic name for the SIP service. The IANA maintains the list of services and their symbolic names.

Protocol

The protocol being used. It is often TCP or UDP, two common transportation protocols.

Domain

The domain name for this particular SRV record. Make sure to include the . at the end.

TTL

TTL value, possibly followed or proceeded by IN, shown in seconds

SRV

Type of record

Priority

The lower the number you enter here, the higher the priority. Use the value 0 for the highest priority.

Weight

This is used for load balancing. This allows you to have servers that take different load levels. Use the value 0 for the lowest load level. It is the opposite of priority values. If the SIP service has multiple SRV records, the weights for these records need to add up to 100. (Think of the weights like percentages. In this example, since the weight is 60, the target for this SRV record will be used 60% of the time.)

Port

The TCP or UDP port number where the SIP service will be accessible

Target

The canonical hostname of the machine providing the SIP service. This is the target for the SRV record content. Make sure to include the . at the end. This hostname must have either an A record or an AAAA record already in place. You cannot use a CNAME record here.

Table of Contents