CS · EN

DNS - SRV and NAPTR Record Types


This article discusses in detail DNS record types SRV and NAPTR. A general guide to DNS records and their settings in the customer administration can be found in the article DNS – Domain Records.

In this article you will learn:


Purpose of SRV records

A Service (SRV) record is used to specify information about the available services of a host. These services commonly include, for example, XMPP (instant messaging protocol), SIP (signaling protocol in internet telephony), or LDAP (protocol for storing and accessing data on a directory server).

An SRV record cannot be used to specify the port on which a service runs if that service does not support this type of record. 

For example, if you want to run a website (HTTP or HTTPS protocol) on a port other than the standard one, you must configure it on the server. You cannot set this port in an A, AAAA, or SRV record.


Entering SRV records

SRV records usually have a specific form for both name and data.

SRV record name

The symbolic name of an SRV record usually has the form _service._protocol, for example _sip._udp

Add any subdomain to the end of this symbolic name, for example _ldap._tcp.subdom. 

SRV record data

SRV record data consists of these parts:

  1. Priority: a positive number determining which record will be evaluated first (the one with the lowest number); the system evaluates the other records only if the priority service is unavailable.
  2. Weight: a relative weight for records with the same priority, used for load distribution.
  3. Port: the TCP or UDP port on which the service listens.
  4. Target: Hostname of the server providing the service.

When filling in an SRV record, follow these rules:

  • Assign the lowest priority number, but the highest weight, to the main server.
  • Enter the hostname in the form of a domain name, not an IP address.

A general SRV record therefore looks like this:

Name              TTL    Type  Data
(symbolic name) 300    SRV  (priority) (weight) (port) (hostname)

Examples of SRV records

Example: An SRV record for SIP over TCP on port 5060 with the target tel.wds-test.cz.

Sample SRV record for SIP over TCP on port 5060 with the target tel.wds-test.cz
Sample SRV record for SIP over TCP on port 5060 with the target tel.wds-test.cz

NAPTR record

The Name Authority Pointer (NAPTR) record is often used in combination with SRV records, most commonly for internet telephony to map the SIP protocol. When entering it, follow the service provider's instructions.


Frequently asked questions

How can I make DNS direct HTTP to a port other than 80 (or 443 for HTTPS)?

You cannot do this in DNS; you must configure it on the server.