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?
I think I may need something like SRV ( http://en.wikipedia.org/wiki/SRV_record ) anyone have experience with this?
Threads with people that have this working via SRV: http://www.minecraftforum.net/topic/1434125-srv-dns-records-server/ - the guy surviveminecraft is in my same situation, and has this working.
This is how I got this working, hopefully it will help someone else in my position.
I created a subdomain sub.example.com for the secondary server running on the non-standard port. ( 25566 )
In my provided DNS manager, under my SRV settings, I applied this in the provided boxes:
_minecraft._tcp.sub priority:0 weight:5 port:25566 target:<ip address here>
'sub' is the name of your subdomain, for example it could be '_tcp.dev' if your subdomain was dev.example.com. Once the subdomain and the SRV are linked, it should work, providing you have the correct port entered and forwarded.