What is a DNS SRV record?
The DNS SRV ("Service") records map hostnames to hostnames of hosts for specific protocols determined using DNS names and port values. DNS SRV records also contain routing instructions using "Priority" value and load-balancing instructions, with the priority using "Weight" value. DNS SRV records function relatively similar to the DNS SRV records, except they can be used for a wide range of services and contain more information than SRV records.
Input required to set DNS SRV records
DNS SRV record requires six inputs:
- Name: This is the DNS name of a hostname. For example, the DNS name will be "www" for the hostname "www.example.com". To set up a DNS record for the root domain “example.com“, this field can be left empty or the symbol ‘@’ used instead. DNS Name must follow the limits defined in RFC1035,
i. DNS name can have up to 250 characters, and must start with a letter (a-z), end with a letter or a digit (0-9), and can have only letters, digits, and hyphen (-) as characters.
ii. DNS name can be split into labels using the dot (.) character, to a maximum of 8 labels. Each label can have 63 characters or less.
- Data: For the DNS SRV record, data (target) is the hostname of the destination host. This target hostname should be mapped to a host using DNS A or AAAA record and is not recommended to use CNAME alias records.
- Priority: Priority (preference) can range from digits 0 to 100. The SRV records with lower priority values are expected to have the highest priority to receive traffic. If two DNS SRV records have the same priority, both email hosts gain equal priority.
- Weight: Weight can range from digits 0 to 100. This input specifies the relative weight for this record, among other SRV records, with the same priority. Larger weights are expected to be given a higher proportional probability for selection. If there were no other SRV record with the same priority, it is recommended for the weight to be 0.
- Port: Port can range from digits 0 to 65535, is the port of the target host.
- TTL: TTL or Time To Live is the time-span limit (in seconds) for the DNS data on the Internet. DNS caching servers use this limit while saving the record temporarily for faster DNS resolution.
Usage scope for DNS SRV records
DNS SRV records resolve a hostname to another hostname which itself resolves to the IP address of a service host. This target hostname is not recommended to be mapped to an alias using CNAME records to avoid extra loops in accessing content.
How to host a DNS SRV record
DNS records are hosted on the Internet through DNS hosting services. If you are using Slickalpha DNS, check this related guide to learn how to add a DNS record on your Slickalpha account.
How to check DNS SRV records
DNS records can be queried directly on your system terminal using the dig command. To check your DNS SRV records on the browser, try our free DNS Lookup tool.
Uses of DNS SRV records
DNS SRV records expand on the functionality of MX records and provide more information than MX records, without being restricted to a service. DNS SRV records are used in Internet services such as IMAP, SIP, VoIP and many more.