3

Is it possible to redirect XMPP using DNS records?

I have a domain hosted on a shared host that does not have Jabber support. If possible, I'd like to still have XMPP on this domain, but have it connect to another IP (configured to support the first domain) without user intervention. I'm using ejabberd on the second server, if that helps.

Jess
  • 473
  • 1
  • 6
  • 16

2 Answers2

3

You need SRV records, e.g.

_jabber._tcp.example.com.       IN SRV   0 0 5269   xmpp.example.com.
_xmpp-server._tcp.example.com.  IN SRV   0 0 5269   xmpp.example.com.
_xmpp-client._tcp.example.com.  IN SRV   0 0 5222   xmpp.example.com.

(Adjust the port numbers and domain names to suit).

XMPP clients should automatically look these up, and if found connect to the specified host name instead of whatever host the main domain itself resolves to.

Alnitak
  • 20,901
  • 3
  • 48
  • 81
2

Bluehost now allows you to edit SRV records.

  1. Open CPanel
  2. Select the "DNS Zone Editor" (under "Domains").
  3. Select the desired domain from the dropdown.
  4. Under "Type", select "SRV" from the dropdown.
  5. Fill in the form.
  6. Repeat step 4 as necessary.

For example, to put in the following record:

_jabber._tcp.example.com. IN SRV 0 0 5269 xmpp.example.com.

You would select "example.com" from the dropdown in step 3.

You would then select "SRV" for "Type" (step 4).

Then, you would fill out the form as follows (step 5):

  • Service: jabber
  • Protocol: tcp
  • Host:
  • TTL: 14400
  • Type: SRV
  • Priority: 0
  • Weight: 0
  • Port: 5269
  • Points To: xmpp.example.com

Note that you are leaving "Host" blank, as you have already selected "example.com" as the host in step 3.

geppy
  • 121
  • 2