In order to ease the user experience, one can setup an SRV record for Minecraft. For example, the build server is running on an ip adress and listens to a specified port. Instead of having the user type in the ip and port, we can instead use something that is easier to remember and easier to use.
Determining the IP
Finding the ip is the first step. Let's assume that the server we want to set SRV for is running on 88.12.34.567 and is using port 25565
Setting up the DNS records
You need to have a domain registered.
We can set the ip adress by setting an
A Record, which will resolve to when someone uses the domain name (ie. mcmiddleearth.com)
In the
Host field you can type the subdomain you want to use, in this case
build and at the
value you can type the ip-adress of the server.
Basically we are now telling the DNS that when someone's computer looks up the domain
build.mcmiddleearth.com it 'translates' to the set ip adress.
However, users will still have to type
build.mcmiddleearth.com:25565 because it requires a port. This is where
SRV Record comes in!
An SRV record requires an already preset A record, this is important to know.
An SRV record could look like this:
_minecraft._tcp.name TTL priority weight port target
The
_minecraft part tells the name of the service, you may not change this or Minecraft will not resolve the SRV properly. What follows is the
.tcp which basically tells the protocol to use. Then it is followed by
.name this should be the subdomain you use.
TTL or time-to-live is the cache setting for your DNS, you can leave this at default.
Priority only matters in case you run multiple services under the same SRV, lower value is higher priority.
Weight changes the order if you have multiple SRV's that run on the same priority.
Port in our case is the 25565 port. Target will be
build.mcmiddleearth.com
In full: _minecraft._tcp.build 30 0 5 25565 build.mcmiddleearth.com
And then you can log in without all that technical stuff with just build.mcmiddleearth.com as ip!
[CODE title="SRV Records"] service protocol priority weigth port target
build srv: _minecraft _tcp.build 1 0 25565 build.mcmiddleearth.com
dev: _minecraft _tcp.dev 1 0 55555 dev.mcmiddleearth.com
event: _minecraft _tcp.event 1 0 55655 event.mcmiddleearth.com
pvp: _minecraft _tcp.pvp 1 0 27565 pvp.mcmiddleearth.com
snapshot: _minecraft _tcp.snapshot 1 0 28565 snapshot.mcmiddleearth.com[/CODE]