A new Matrix or XMPP deployment fails federation because peers can’t find the right host or port. A SaaS phone provider tells the customer to publish a SRV record for SIP and they don’t know where in cPanel to do that. SRV records are uncommon enough that the documentation usually assumes you’ve done them before. cPanel’s Zone Editor does support them, with a syntax that’s specific enough to fumble on the first try.
What’s happening
A SRV record points to a specific host:port for a named service under a named protocol. The owner name has a fixed shape:
_service._protocol.example.com
The value has four fields:
priority weight port target
Common examples:
_sip._tcp.example.com 3600 IN SRV 10 5 5060 sip.provider.com._xmpp-client._tcp.example.com 3600 IN SRV 10 100 5222 xmpp.example.com._minecraft._tcp.play.example.com 3600 IN SRV 0 5 25565 mc1.example.com.
Priority works like MX — lower number wins. Weight tiebreaks between equal priorities for load distribution. Port and target tell the client where to connect. Some clients ignore SRV entirely and connect to the default port — Matrix and XMPP federation honour SRV; many SIP clients honour SRV; SMTP doesn’t, despite what some old SRV-for-mail proposals suggested (MX is its own thing).
How to verify
Resolve the SRV explicitly:
dig +short SRV _sip._tcp.example.com
dig +noall +answer SRV _matrix._tcp.example.com
host -t SRV _xmpp-client._tcp.example.com
The output shape is priority weight port target.. If the target doesn’t end with a dot, you’ll see your server’s hostname appended, which is almost certainly wrong.
For Matrix federation specifically, the federation test endpoint will tell you whether the SRV resolved and whether the well-known fallback was used.
What to do
In cPanel Zone Editor, click Add Record and choose SRV (under the dropdown). The fields:
- Name: the underscore-prefixed service and protocol, with the domain — for example
_sip._tcp.example.com. - TTL: 3600 is fine; lower to 300 if you’re testing.
- Priority: a number like 10.
- Weight: a number like 5 (or 0 if priority alone matters).
- Port: the TCP/UDP port of the actual service.
- Target: the fully qualified hostname of the server, with trailing dot if cPanel’s UI doesn’t add it.
In WHM’s raw zone editor, the same record is one line:
_sip._tcp 3600 IN SRV 10 5 5060 sip.example.com.
Note the host (_sip._tcp without the domain — named adds it from $ORIGIN). If you write the full FQDN with a trailing dot, that also works; without the trailing dot, named appends the origin again and you get _sip._tcp.example.com.example.com..
After publishing, named-checkzone example.com /var/named/example.com.db should pass. The SOA serial increments automatically through cPanel.
If the SRV points to a host outside the zone, that host’s A record is the consumer’s resolver job, not yours. If it points inside the zone, make sure the A record for the target exists — a SRV pointing to a name that doesn’t resolve is silently broken.
Stack Harbor publishes and tests SRV records during VoIP and federation onboarding as part of deployment management.