SRV Records

You will need to set SRV records both for client-to-server (c2s) communication and, if you plan to use it, server to server (s2s) communication. We recommend both records are entered for every server as some resources or clients will check for both records. For this example we will use is our domain, and xmpp as the xmpp server subdomain.

SRV records have the following form: TTL class SRV Priority weight port target.

The key is as follows:

  • service: is the symbolic name of the desired service, in this case it would be xmpp-client or xmpp-server.
  • protocol: is the transport protocol, either TCP or UDP, XMPP traffic will take place over TCP.
  • name: the domain name where the server resides, in this case
  • TTL: a numeric value for DNS time to live in milliseconds, by default use 86400.
  • class: DNS class field, this is always IN.
  • priority: the priority of the target host with lower numbers being higher priority. Since we are not setting up multiple SRV records, we can use 0.
  • weight: the relative weight for records with the same priority. We can use 5.
  • port: the specific TCP or UDP port where the service can be found. In this case it will be 5222 or 5269.
  • target: the hostname of the machine providing the service, here we will use

For our example server, the SRV records will then look like this: 86400 IN SRV 0 5 5222 86400 IN SRV 0 5 5269