Skip to main content Skip to search
Carl Levine
Posted by
Carl Levine on
December 13, 2016

Understanding SRV Records

In addition to the basic DNS record types that were defined in the original RFC for the protocol, additional feature-specific record types have been added over the years to accommodate interoperability of other peripheral technologies in conjunction with the DNS. 

The Service Record, or SRV record, is an example of this. Where a typical DNS record indicates the address of a resource, SRV also provides the provision to specify a port and protocol for that request. This comes in very handy cases where a specific application requires a different port to access the resource in question, such as IP telephony or certain proprietary messaging systems. This article serves to explain the mechanics of the SRV record, and its proper usage.

Dissecting the SRV Record Type

The SRV record contains more information than the typical DNS record as it contains specific information that can be used to locate a specific resource at an address. This is an example of what an SRV appears like in a typical BIND-style zone file:


_sip._tcp.example.com. 86400 IN SRV 0 5 5060 sipserver.example.com.

|____________________||_____||_||__|_|_|____|______________________| 

          1              2    3  4  5 6  7             8 
  1. Address - Location of the SRV record, including the resource type (_sip) and protocol (_tcp) - This information is often given by the provider of the service the SRV is being set up for.
  2. TTL - Expiration value of the record.
  3. Internet-type - Standard BIND notation indicating that the record is on the InternetRecord type - Standard BIND notation indicating that it’s an SRV record.
  4. Priority - Much like an MX record, one is able to set priority of more than 1 record at the address.
  5. Weight - There is provision for a rudimentary load balancing schema. All values across all records at the address must add up to 100. The higher the weight, the more often the specific record will be served and vice versa. 
  6. Port - TCP or UDP port where the specified service can be found.
  7. Target Endpoint - the canonical hostname of the machine providing the service.

Leveraging the SRV Record Type In NS1’s Portal

  1. Log into the NS1 portal and locate the zone you want to set the SRV record up on.
  2. Add a new record
    Click Add Record.
  3. Select SRV from the dropdown box
    Select SRV from the drop down box.
  4. SRV record configuration screen
    Input the information provided into the appropriate boxes
    1. Priority of target host (Priority)
    2. Relative weight for hosts with same priority (Weight)
    3. TCP/UDP service port (Port)
    4. Host providing service (Target Endpoint)
  5. Changes will be committed and propagated to our edge servers once you press Save All Changes