Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
It looks like Bluehost doesn't support SRV records in their DNS manager, but thanks! –  Andrew Koester 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 at 14:21
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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