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
example.com to your domain. Change
server to look up the port that
servers should connect to. Change
xmpps to look up the port for direct TLS aka XMPP over
SSL or XMPP over TLS.
host -t SRV _xmpp-client._tcp.example.com
dig _xmpp-client._tcp.example.com SRV
Linux, macOS, Windows>
nslookup -querytype=SRV _xmpp-client._tcp.example.com