Can I configure a subdomain to point to a specific port on my server

If you have access to SRV Records, you can use them to get what you want 🙂

E.G

A Records

Name: mc1.domain.example
Value: <yourIP>

Name: mc2.domain.example
Value: <yourIP>

SRV Records

Name: _minecraft._tcp.mc1.domain.example
Priority: 5
Weight: 5
Port: 25565
Value: mc1.domain.example

Name: _minecraft._tcp.mc2.domain.example
Priority: 5
Weight: 5
Port: 25566
Value: mc2.domain.example

then in minecraft you can use

mc1.domain.example which will sign you into server 1 using port
25565

and

mc2.domain.example 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

Leave a Comment