Networking & DNS

DNS SRV records explained: format, examples and setup

What SRV records do, the service, protocol, priority, weight, port and target fields, real examples for Microsoft 365, SIP, XMPP and Minecraft, and how to add and test them.

IntermediateDNS2 min read

An SRV (service) record tells clients which server and port provide a particular service for a domain. Unlike an A record, it includes the port number and lets you set priorities and load-sharing weights. SRV records are used by VoIP, chat, autodiscovery for email clients, and some games. This guide explains the DNS SRV record format with examples.

Before you start

Have the exact SRV values from the service's documentation and access to your DNS zone (for example cPanel → Domains → Zone Editor).

SRV record format

_service._proto.name.  TTL  IN  SRV  priority weight port target.
_sip._tls.example.com. 3600 IN  SRV  10       60     443  sip.provider.example.
FieldMeaning
_serviceThe service name, e.g. _sip, _xmpp-client, _autodiscover
_proto_tcp, _udp or _tls
priorityLower is tried first; higher values are backups
weightShare of traffic among records with the same priority
portTCP or UDP port of the service
targetHostname with an A/AAAA record – not a CNAME, not an IP

Priority and weight example

_xmpp-client._tcp.example.com. IN SRV 10 70 5222 chat1.example.com.
_xmpp-client._tcp.example.com. IN SRV 10 30 5222 chat2.example.com.
_xmpp-client._tcp.example.com. IN SRV 20 0  5222 backup.example.com.

Clients send about 70% of connections to chat1 and 30% to chat2; backup is used only if both are unreachable.

Common SRV records

  • Email autodiscovery: _autodiscover._tcp pointing to a mail host on port 443 helps Outlook find settings. cPanel can create these for you.
  • Microsoft 365 / Teams: _sip._tls and _sipfederationtls._tcp records as listed in the Microsoft admin center.
  • XMPP chat: _xmpp-client._tcp and _xmpp-server._tcp.
  • Minecraft Java: _minecraft._tcp.play.example.com lets players join play.example.com even when the server uses a non-default port.
  • CalDAV/CardDAV: _caldavs._tcp and _carddavs._tcp.

Add an SRV record in cPanel

  1. Open cPanel → Domains → Zone Editor → Manage.
  2. Click Add Record and choose SRV.
  3. Enter the name including service and protocol (for example _sip._tls.example.com.), then priority, weight, port and target.
  4. Save.

Many DNS panels have separate fields for service, protocol and name; others want the full _service._proto.name in one field.

Check an SRV record

dig _sip._tls.example.com SRV +short
nslookup -type=SRV _minecraft._tcp.play.example.com

Troubleshooting

  • Service not found by the app: name typo (missing underscore or wrong protocol), or the app doesn't support SRV lookups.
  • Target points to a CNAME or IP: the RFC requires a hostname with A/AAAA records.
  • Duplicated domain in the name: the panel appended the zone name to a name you typed in full.

FAQ: DNS SRV records

Do browsers use SRV records for websites?

No. Web browsers use A/AAAA (and newer HTTPS/SVCB records), not SRV.

What does a weight of 0 mean?

The record is selected only when no other records with the same priority are available, or by equal chance among zero-weight records.

Can SRV records point to another domain?

Yes, the target can be any hostname, including one at your service provider.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.