coolpixels

how to set up a minecraft server with an srv record

minecraft server hosts nearly always allocate messy ips with ports, for example 257.102.54.80:54934. while many hosts sell subscriptions to use a domain with a minecraft server, many others don’t, and doing it yourself is not only almost always cheaper (or free if you already have a domain) but also very easy.

prerequisites

  • a domain with access to change DNS records
  • a minecraft: java edition server

tutorial

1. creating the A record

NOTE: if your server already has a subdomain (e.g. jumping-antelope.server.host) you can skip this step

create an A record pointing to your minecraft server’s ip.

play.coolpixels.net.      1       IN      A       155.94.252.232

2. creating the SRV record

since 1.3.1, minecraft: java edition supports SRV records. SRV records are a complex system that i don’t pretend to understand but you can use them to route traffic on a specific protocol (like minecraft’s TCP) to a specific server.

set parameters like these on a new SRV record:

  • name: _minecraft._tcp (or _minecraft._tcp.subdomain if you want to use a subdomain)
  • priority: any number (i use 55)
  • weight: any number (i use 55)
  • port: your minecraft server’s port
  • target: the subdomain created in step 1

here’s what an example might look like if your domain was coolpixels.net, you used play as your subdomain in step 1, and your server runs on port 25578:

_minecraft._tcp.coolpixels.net.   1       IN      SRV    55 55 25578 play.coolpixels.net.

3. done

enjoy!

notes

  • bedrock edition does not support srv records as of writing, but your bedrock players can use the subdomain created in step 1 with the port the server runs on.