Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I have two minecraft servers, on sub-domains. www.server1.example.com and www.server2.example.com. server1 is port 25565, server2 is port 25566.

When users want to connect to a non-default port in minecraft, they have to specify www.server2.example.com:25566 to connect to the server. On the default port, this is not needed, they can simply connect via www.server1.example.com.

How can I pass along which port they're connecting to on the backside of things, so that users connecting to a non-standard port only have to type in the sub domain?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Luckily for you, Minecraft uses SRV records when looking up servers. This allows you to specify a port for each hostname. Simply create two different SRV records in your DNS zone with different hostnames and ports:

_minecraft._tcp.www.server1.example.com.  <TTL>  IN  SRV  <priority>  <weight>   25565   actual-host-server.example.com.
_minecraft._tcp.www.server2.example.com.  <TTL>  IN  SRV  <priority>  <weight>   25566   actual-host-server.example.com.

(Note: I haven't actually used SRV myself; this is based on another page on using SRV with Minecraft.)

Note that actual-host-server.example.com must have an A record; that is, it cannot be a CNAME alias for another domain name.

share|improve this answer
@Tillman32 Eh? I just picked out a random *.no-ip.org address and looked it up, and I got an A record, not a CNAME record. (A is what maps hostnames to IPs, after all.) Using such a name in the SRV record should work fine. –  Kevin Reid Feb 25 '13 at 0:40

You can also use the forced-hosts of bungeecord if you'd be interested in using a proxy. I think Cnames might work, but I've not tried it

share|improve this answer

Your Answer


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.