The name format is the hard part
SRV records (RFC 2782) live at names of the form _service._proto.name. Both the service and the protocol labels are prefixed with an underscore, and both are required. Querying example.com for SRV records returns nothing, always — and that empty answer is correct, not a failure. You have to know which service you are asking about.
dig +noall +answer _sip._tcp.tel.t-online.de SRV
_sip._tcp.tel.t-online.de. 3600 IN SRV 10 0 5060 stg010-l01-mav-pc-rb-001.edns.t-ipnet.de.
_sip._tcp.tel.t-online.de. 3600 IN SRV 20 0 5060 nes008-f01-mav-pc-rb-001.edns.t-ipnet.de.
_sip._tcp.tel.t-online.de. 3600 IN SRV 30 0 5060 hno002-f01-mav-pc-rb-001.edns.t-ipnet.de.| Field | Example | Meaning |
|---|---|---|
| Priority | 10 | Lowest number is tried first, exactly like MX preference. Higher numbers are backups. |
| Weight | 0 | Relative share of traffic among records at the same priority. A weight of 0 with no siblings means "no preference". |
| Port | 5060 | The TCP or UDP port the service listens on. This is what SRV adds over a plain A record. |
| Target | stg010-…t-ipnet.de. | A hostname with A/AAAA records. It must not be a CNAME, and a single dot means the service is explicitly not available. |
Weight only applies within a priority level. Given two records at priority 10 with weights 30 and 70, clients should send roughly 30% and 70% of connections respectively. Across different priorities, weight is irrelevant — priority 20 is touched only when everything at priority 10 fails.
Read the full explanation of srv record lookup results ↓Show less ↑
Service names you will actually meet
_sip._tcpand_sip._udp— SIP signalling._sips._tcpfor TLS-protected SIP._xmpp-client._tcpand_xmpp-server._tcp— XMPP client and server-to-server connections._ldap._tcpand_kerberos._tcp— directory and authentication. Active Directory publishes a large set under_msdcs, and domain join fails outright when they are missing._autodiscover._tcp— Microsoft Exchange and Microsoft 365 client configuration._caldavs._tcpand_carddavs._tcp— calendar and contacts autodiscovery for Apple and other clients._minecraft._tcp— lets players connect without typing a port number._matrix._tcp(now largely superseded by the.well-knowndelegation method) — Matrix homeserver discovery.
.) is meaningful: RFC 2782 defines it as "this service is definitively not available at this domain". It stops clients from falling back to guesswork, which is occasionally exactly what you want.How to read the results
- Records returned — read the priority column first. That is the order clients will try, and it is where a failover misconfiguration shows up.
- No records at the underscore name — either the service is not published, or you have the service/protocol label wrong. Try both
_tcpand_udpbefore concluding anything. - NXDOMAIN — the underscore name itself does not exist. That is the same as "no SRV published" for practical purposes, though it means no record of any type exists at that name.
- A target that does not resolve — the SRV record is valid but useless. Always follow up with an A record lookup on the target.
- A port nothing is listening on — DNS cannot tell you this. Confirm with the port checker; an SRV record pointing at a closed port is the most common "the record is right but it does not work" case.
Common failures and fixes
- Underscores stripped or rejected by the control panel. Some panels refuse underscore labels or add the domain twice, producing
_sip._tcp.example.com.example.com. Query the exact name here to see what was really published. - Target is a CNAME. RFC 2782 forbids it. Some clients follow it anyway, others fail; you get intermittent, client-dependent breakage. Point the target at a name with real A/AAAA records.
- A port number in the target field. The target is a hostname only. The port belongs in its own field — that is the entire point of SRV.
- All records at the same priority when you wanted failover. Equal priorities mean load sharing, not failover. Give the backup a higher number.
- Provider expects separate fields. Many panels split priority, weight, port, and target into four inputs, and pasting the whole record into one field yields garbage. Check the result here after saving.
- Client ignores SRV entirely. Plenty of software never looks up SRV records — web browsers, notably, do not. SRV only works when the client implements it.
Querying SRV from the command line
# The SRV records themselves
dig +short _sip._tcp.tel.t-online.de SRV
# With TTLs and the full answer section
dig +noall +answer _xmpp-server._tcp.jabber.org SRV
# Resolve each target to an address
for t in $(dig +short _sip._tcp.example.com SRV | awk '{print $4}'); do
echo -n "$t -> "; dig +short "$t" A | tr '\n' ' '; echo
done
# Confirm something is actually listening on the advertised port
nc -vz sipserver.example.com 5060If you are debugging a service that will not connect, work the chain in order: does the SRV name resolve, does the target resolve, is the port open. Each step has a different owner and a different fix, and skipping straight to the application logs wastes time. The full DNS lookup accepts underscore names too if you want to see every record type at once.