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.


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.

  • It looks like Bluehost doesn't support SRV records in their DNS manager, but thanks! – Jess Jun 11 '10 at 17:56
  • You could always move your DNS elsewhere, such as dns.he.net or everydns.net - that would work. – dotwaffle Jun 15 '10 at 15:47
  • Related question about _jabber._tcp. – unor Mar 14 '14 at 14:21

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.