DNS SRV record
(also DNS Service record)
DNS SRV record definition
A DNS SRV record is a domain name system resource record that specifies the hostname and port number of each server for selected services like voice over IP and instant messaging. The difference between a DNS SRV record and other DNS records is that the other records only specify a server or an IP address, while SRV records specify a port at that IP address. DNS SRV records also usually define a symbolic name and the transport protocol that domain names use. Additionally, DNS SRV records determine the relevant service’s priority, weight, and target. All DNS SRV records can point to either an A record in IPv4 or an AAA record in IPv6.
DNS SRV record example
_servicename._protocol.name. TTL class type priority weight port target.
- servicename: The symbolic name of the specified service.
- protocol: The transport protocol of the specified service, usually TCP or UDP.
- name.: The domain name to which the record belongs.
- TTL: DNS time to live field.
- class: DNS class field, which is always IN.
- type: The type of the record, which is always SRV for DNS SRV records.
- priority: Shows the priority of the host. The lower the priority value, the more preferred the host is.
- weight: A weight assigned for records with the same priority. If the value is higher, it is more likely that this record will be chosen.
- port: The port on which the service will be located within the target server, which can either be TCP or UDP.
- target.: The canonical name of the target server.