DNS Records

The Complete Guide to SRV Records

This is the sixth installment In the of a ten-part series outlining the ten most common Domain Name System (DNS) Records.  In this article I will examine SRV Records, or Service Records.  Find links below to the previous articles:

What is a SRV Record?

An SRV Record defines the hostname and port number of servers for specified services associated with a domain.    If you purchase a mail hosting plan for your domain, you may need to setup an SRV record.  SRV records are used by Microsoft Outlook, Microsoft Office 365, and Macintosh mail among others.  For Microsoft services, the SRV record is used to locate the Autodiscover service.  Networks that utilize Microsoft Windows domain controllers register their network service types for Active Directory in the DNS.

For further reading refer to RFC 2782, which defines an SRV Record as:

   The SRV RR allows administrators to use several servers for a single
   domain, to move services from host to host with little fuss, and to
   designate some hosts as primary servers for a service and others as
   backups.

SRV Records Format

SRV Records are in the following format:

_service._protocol.name. Time-To-Live class SRV priority weight port target.

As an example, these are my two SRV records setup on one of my domains.  This specific domain has Microsoft Office services installed for my domain:

_sip.tls.jasonofflorida.com 3600 IN SRV 100 1 443 sipdir.online.lync.com
_sipfederationtls._tcp.jasonofflorida.com 3600 IN SRV 100 1 5061 sipfed.online.lync.com

SETTING UP A SRV RECORD

Below is an image for adding an SRV record on a domain I have hosted through GoDaddy.  Beneath the image, I have defined each term, and also given the limitations and requirements of each field.

Adding an SRV Record

  • type: the type of DNS Record you want to add – select SRV.
  • service: the symbolic name of the desired service.  Valid service names must:
    • be at least 1 character and no more than 15 characters long
    • contain only US-ASCII letters (A-Z, a-z, 0-9, and hyphens)
    • contain at least one letter
    • NOT begin or end with a hyphen
    • hyphens must not be adjacent to other hyphens
  • protocol: the transport protocol of the desired service; this is usually either TCP or UDP.
    • limited to one or more of TCP, UDP, SCTP, and DCCP
  • name: the domain name for which this record is valid, ending in a dot.
    • For many DNS providers, If you want to link the record to your domain name, type @.
  • target: the canonical hostname of the machine providing the service, ending in a dot.
    • Enter the host name of the machine providing the service, such as sipdir.online.lync.com
    • the name MUST NOT be an alias
  • priority: the priority of the target host, lower value means more preferred.
    • The range is 0-65535 because it’s a 16-bit integer.
  • weight: A relative weight for records with the same priority, higher value means higher chance of getting picked.
    • The range is 0-65535 because it’s a 16-bit integer.
    • In the presence of records containing weights greater than 0, records with weight 0 should have a very small chance of
      being selected.
  • port: the TCP or UDP port on which the service is to be found.
    • The range is 0-65535 because it’s a 16-bit integer.
  • TTL: standard DNS time to live field.  I discussed Time To Live in detail in part 1 of this series examining the Address Record.
  • class: always IN – you probably don’t have an option on this field in your editor.
    • Reference RFC 1035
      • IN 1 the Internet
      • CS 2 the CSNET class (Obsolete – used only for examples in
        some obsolete RFCs
      • CH 3 the CHAOS class
      • HS 4 Hesiod [Dyer 87]

If you received some added value from my post, please like and follow us on Facebook, Twitter, and LinkedIn, or subscibe to jasonofflorida.com.  Next in the DNS Records Series I will discuss the PTR Record, or Pointer Record.

Husband, Dad to 4 boys, #SoftwareTester, #domainInvestor, #WebEntrepreneur, and has-been runner.

Leave a Reply