Help

DNS SRV Records Explained

DNS SRV records are a type of DNS record that are used to specify the host and port for specific services, such as voice over IP (VoIP), instant messaging, and so on. SRV records are useful when you want to locate and connect to a service that is not running on the default port, or when you want to load balance or prioritize multiple servers that offer the same service. In this article, we will explain what DNS SRV records are, how they work, and how to configure and use them.

What is a SRV record?

The “SRV” in the SRV record stands for “Service”, which is used to specify the service name, the transport protocol, the host name, and the port number for a particular service. For example, if you pull the DNS records of _sip._tcp.example.com, the SRV record currently returns a value of: 10 5 5060 sipserver.example.com. This means that the service name is SIP, the transport protocol is TCP, the host name is sipserver.example.com, and the port number is 5060.

How do SRV records work?

DNS SRV records work by enabling a user’s device to find and connect to a service, without the user memorizing and typing in the actual host name and port number. The user’s web browser or other application automatically carries this out by sending a query to a DNS resolver, which is a server that knows how to look up DNS records.

The DNS resolver then contacts the authoritative DNS server for the service name and the transport protocol, which is the server that holds the DNS records for that service. The authoritative DNS server responds with the SRV record, which contains the host name and the port number for the service. The DNS resolver then performs another DNS lookup for the host name, and returns the IP address associated with it to the web browser or other application, which can then establish a connection with the service on the specified port.

You can also add multiple SRV records for the same service name and transport protocol, which can provide load balancing and prioritization for multiple servers that offer the same service. For example, you can add SRV records for _sip._tcp.example.com and point them to different servers and ports, such as sipserver1.example.com:5060 and sipserver2.example.com:5061.

Ready to get started?
Start your free trial today.

Sign up for our newsletter

Get occasional updates about new features, integrations, and future plans to your inbox.

We will send a confirmation opt-in email to your inbox. Privacy Policy.