Check DNS SRV records for XMPP

Client records for xmpp.org

XMPP clients will use these when logging in.

TargetPortPriorityWeightNotes
xmpp.xmpp.org 9222 1 1
Non-standard port.1
Footnotes

1. The customary port for client-to-server connections is 5222. Using a different port isn't necessarily bad—clients that correctly use DNS SRV records will happily connect to this port—but we thought it was worth pointing out in case it was an accident. And there may be advantages to using a non-standard port. For example very restrictive firewalls might disallow outbound connections to port 5222 but still allow connections to 443 (also used by https).

Server records for xmpp.org

Other XMPP servers will use these when peering with this domain.

TargetPortPriorityWeightNotes
xmpp.xmpp.org 9269 1 1
Non-standard port.1
Footnotes

1. The customary port for server-to-server connections is 5269. Using a different port isn't necessarily bad—servers that correctly use DNS SRV records will happily connect to this port—but we thought it was worth pointing out in case it was an accident. And there may be advantages to using a non-standard port. For example very restrictive firewalls might disallow outbound connections to port 5222 but still allow connections to 443 (also used by https).


About

XMPP clients can determine what host and port to connect to by looking up DNS SRV records. These records are described in section 3.2.1 of the XMPP Core RFC and in XEP-0368. It can be tricky to configure these records. Use this page as a tool to check that your DNS SRV records are correct.

You can also fetch these records yourself with any of the following commands. Change example.com to your domain. Change client to server to look up the port that servers should connect to. Change xmpp to xmpps to look up the port for direct TLS aka XMPP over SSL or XMPP over TLS.

Linux, macOS> host -t SRV _xmpp-client._tcp.example.com
Linux, macOS> dig _xmpp-client._tcp.example.com SRV
Linux, macOS, Windows> nslookup -querytype=SRV _xmpp-client._tcp.example.com

This Page
Created by Mark Doliner
Source available on GitHub

Other Resources
Prosody IM's DNS configuration info
IM Observatory - Can perform various tests of an XMPP server.