Minecraft - 2 Servers, One IP Address, 2 Ports, 2 Domains [closed]
Before you create SRV records, you need to have a normal A record that points to your server's IP address. It can be the same FQDN as one of the names you want to use in the SRV records, but it doesn't have to be. For this example, I'm going to assume it's just example.com
. So a DNS query for example.com
must point to your server's IP address.
SRV record creation requires 5 things:
- The FQDN of the SRV record
- A numeric
priority
value - A numeric
weight
value - A numeric
port
value - The FQDN of the
target
host
For Minecraft, the FQDN will always start with _minecraft._tcp
. Depending on the UI you have for creating SRV records, it might ask you for service
and protocol
instead of the raw FQDN. It also varies whether the UI will expect you to include the leading _
character in each part. In any case, the FQDN for the domains you included in your examples would be:
_minecraft._tcp.domain1.com
_minecraft._tcp.domain2.com
Because you likely only have a single instance per domain, the priority
and weight
values are irrelevant. But most tutorials instruct you to set them to 0
and 5
respectively.
The port
is the port your server is running on. You still need to include it in the record for the default port.
And finally, the target
in this case is our A record example.com
To verify things are setup properly, run nslookp -q=srv _minecraft._tcp.domain1.com
and make sure you get a result and the result looks something like this (assuming Windows nslookup utility). This is the same query the Minecraft client will run when you attempt to connect to "domain1.com".
Non-authoritative answer:
_minecraft._tcp.domain1.com SRV service location:
priority = 0
weight = 5
port = 25565
svr hostname = example.com
You'll also want to double check that nslookup example.com
also returns your server IP address.