What is SRV Record?

The SRV Record is a specification of data in the Domain Name System (DNS) defining the location (i.e. the hostname and port number) of servers for specified services. It is frequently used when configuring SIP or some other third-party service.

SRV Records enhance network efficiency by providing a standardized way to map services to specific servers, enabling smooth communication across various applications. These records play a crucial role in simplifying resource allocation and optimizing service discovery, establishing a solid foundation for efficient and reliable network operations.

Components of SRV records

The service of SRV record has the following components:

  • Service: The symbolic name of the desired service.
  • Protocol: The transport protocol of the desired service; this is usually either TCP or UDP.
  • Name: The domain name for which this record is valid, ending in a dot.
  • TTL: The standard DNS time to live field.

The SRV record has the following look in your ClouDNS Control Panel:

Host: Type: Points to: TTL
_service._protocol e.g.: _sip._tcp* SRV hostnameofthemashine.com. 1 Hour

*This hostname is used as an example.

Why do you need an SRV record?

Let say you want to run a video or/and audio connection on a specific port of your server. Typically, you will use the SIP protocol to regulate this communication. And here is where the SRV record comes in. It allows you to specify how your domain name handles this particular service.

The SRV record makes it easier for web applications, such as chat applications, audio/video streaming services, VoIP, and others, to connect to the relevant server on the correct port number. Furthermore, SRV records allow servers to be load-balanced, ensuring that the server connections are dependable and resilient. Additionally, SRV records can easily assign a service to a specific host, allowing for a more streamlined approach to network maintenance.

How to create a DNS SRV record?

Go to your Control Panel and click on Add new record. Type, as follow:

  • Type: SRV
  • TTL: 1 Hour
  • Host: _service._protocol e.g.: _sip._tcp
  • Priority: (From 0 to 65535) The priority of the target host, lower value means more preferred.
  • Weight: From 0 to 65535) A relative weight for records with the same priority, higher value means more preferred.
  • Port: (From 0 to 65535) The TCP or UDP port on which the service is to be found.
  • Points to: The canonical hostname of the machine providing the service, ending in a dot.

How to add an SRV Record - Step by Step video:

SRV record VS CNAME record

CNAME's role is quite trivial. It simply maps a certain hostname of your domain to another hostname or domain. The SRV purpose is a bit more complicated. It defines a host of your domain for which a certain service is supported.

SRV record VS A record

As the most commonly used resource record, the DNS A record is used for Forwarding DNS Resolution. It just points your hostname to an IP address. And the SRV is used to specify the location (hostname and port number) of specific service and how does your domain handle that service.

How to start managing SRV records for your domain name?

  1. Open free trial account from here - free forever
  2. Verify your e-mail address
  3. Log into your control panel
  4. Create new Master DNS from the [add new] button - read more here
  5. Add the SRV record(s) you need as it is described in this article

How to check SRV record

You can perform a dig lookup for the relevant domain name with the following Dig command:

$ dig srv cloudns.net

You can check the DNS SRV record with Nslookup as well. A sample is shown below:

$ nslookup -type=srv cloudns.net

In addition, to check SRV records, you could use an online DNS record lookup tool such as the ClouDNS Free DNS tool. Simply enter the domain name you wish to check, and the tool will return a list of any DNS records associated with the domain. And if there is a set-up SRV record, it will give more detailed information. 

Support of SRV records

ClouDNS provides full support for SRV records for all our DNS services, including the listed below. Just write to our technical support, if you need any assistance with your SRV records configuration. Our Technical Support team is online for you 24/7 via live chat and tickets.


Question: I can't see where to fill my service and protocol. Am I doing something wrong?

Answer: The crucial moment here is that there aren't any separate fields for service and protocol. You must add them in the Host field with your hostname, like _sip._tcp.hostname for example.

Question: What are the differences between Priority and Weight?

Answer: The Priority defines which SRV record of the target host will be preferenced. Lower value means more preferred. And the Weight parameter represents the relative weight for records with the same priority. Higher value means more preferred.

Question: Is it possible to set up SRV records for other services besides email and VoIP?

Answer: Yes, it is possible to set up SRV records for other services such as SIP, WebRTC, and even databases. All you need to do is enter the relevant details, such as the service name, protocol, and target, into the appropriate fields in your DNS settings.

Question: Can an SRV record point to an IP address directly?

Answer: No, SRV records point to a target hostname, not directly to an IP address.

Question: What happens if an SRV record is misconfigured or missing?

Answer: Misconfigured or missing SRV records can lead to service disruption, as applications may struggle to locate the required services associated with the domain.

Last modified: 2024-02-27
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more