I have an old computer which I converted into a minecraft server. I have 2 minecraft servers running simultaneously, one on port 25565 (default) and one on port 25566.
I bought the domain something.com and pointed it to my server. Right now, in the game you type something.com to get into the first server and something.com:25566 to get into the other server.
Is there a way to set one.something.com to point to the first server and two.something.com to point to the second server? I own the (centos) server, have root access, and everything else. The domain is controlled by no-ip if that makes a difference. I know that DNS has no relationship to port numbers but if there a program I can install to make this work?
Thanks :)
If you are running a web service (that is run on port 80 by default) on your home network computer accessible from the internet, you can redirect your Namecheap domain to an IP address of the server along with a port.
Domain names don't refer to specific ports. They just refer to IP addresses. The client can look up a hostname to get the IP address which the client should connect to, but the client has to figure out the port without the help of DNS. Port 80 is just the default port for HTTP service.
Yes, It's possible. For Example. You would either Contact your Host to set this, or if you have the ability to point DNS your self then do so. Just make sure that the site you want to serve on that subdomain exists on the server that it's pointing to.
Under Modify a Subdomain, locate the domain you want to redirect, then click its Manage Redirection link on the right. In the text box, type the URL you would like visitors to be redirected to if they go to the subdomain sample1.hgexample.com. Click Save. You will see the redirected URL under the Redirection column.
If you have access to SRV Records, you can use them to get what you want :)
E.G
A Records
Name: mc1.domain.com Value: <yourIP> Name: mc2.domain.com Value: <yourIP>
SRV Records
Name: _minecraft._tcp.mc1.domain.com Priority: 5 Weight: 5 Port: 25565 Value: mc1.domain.com Name: _minecraft._tcp.mc2.domain.com Priority: 5 Weight: 5 Port: 25566 Value: mc2.domain.com
then in minecraft you can use
mc1.domain.com which will sign you into server 1 using port 25565
and
mc2.domain.com which will sign you into server 2 using port 25566
then on your router you can have it point 25565 and 25566 to the machine with both servers on and Voilà!
Source: This works for me running 2 minecraft servers on the same machine with ports 50500 and 50501
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With