// Minecraft

A custom domain for your Minecraft server: SRV records explained

A custom domain for your Minecraft server: SRV records explained

"Just join at 203.0.113.10:25607." It works, but it rolls off the tongue terribly, nobody remembers it, and if your server ever moves you get to personally send everyone the new address. Compare that with play.yourdomain.com: easy to remember, professional, and you decide where it points. The only thing in between is a bit of DNS work — and above all one record type hardly anyone outside Minecraft circles knows: the SRV record.

Why a custom domain?

The first advantage is simple: everyone remembers play.yourdomain.com, nobody remembers a string of digits with a colon. It looks better on your Discord, your website and everywhere else you promote your server. But the biggest advantage sits under the bonnet: the address is yours. If your server ever moves to another plan or another IP, you change one DNS record and no player notices a thing. Without a domain, a change like that is guaranteed to lose you players who miss the new address.

Honestly: for a private little server with three friends, an IP is perfectly workable. A domain costs a few euros a year and becomes really worthwhile once your server has a name, a community or plans to grow.

How A and SRV records work together

DNS is the phone book of the internet. An A record links a name to an IP address: play.yourdomain.com points to 203.0.113.10. But there's one thing an A record can't do: carry a port. And that's where it pinches, because hosted Minecraft servers by no means always run on the default port 25565.

That's what the SRV record is for. When a Java player types in an address, the client first checks whether an SRV record exists at _minecraft._tcp. followed by that address. If so, that's where it says which port and which hostname should actually be used. The player notices nothing: they type play.yourdomain.com, without a port, and get straight in.

If your server does happen to run on port 25565, an A record alone is enough; the SRV record only becomes necessary for any other port. And important for crossplay servers: Bedrock doesn't know SRV records. Bedrock players enter the address and the port separately.

Step by step

  1. Get a domain. If you already have one (for your community's website, for example), simply use a subdomain of it. If not: any registrar will sell you one for a few euros a year.
  2. Look up your server's IP and port. They're in your panel; see also finding your server's numeric IP.
  3. Open the DNS management at the party where you manage your domain.
  4. Create an A record for your subdomain, pointing to your server's IP.
  5. Create the SRV record that adds the port.

Concretely, that looks like this (with an example IP and port):

Type  Name                   Value
A     play                   203.0.113.10
SRV   _minecraft._tcp.play   priority 0, weight 5, port 25607, target play.yourdomain.com

You can leave the priority and weight fields at 0 and 5; they only start doing something once you put several SRV records side by side. The target always has to be a hostname with an A record on it — never a bare IP address, because that's invalid in an SRV record. For MC-Node servers this is also explained step by step in the knowledge base: setting up a Minecraft play domain.

TTL and patience

Every DNS record has a TTL, "time to live": the number of seconds other DNS servers may remember your answer before coming back to check. If your TTL is 3600, a change can therefore take up to an hour to travel. In practice you often see new records within minutes, but don't count on it. Two practical tips. One: set the TTL low (300, for example) while you're setting up and testing; afterwards it can go back up. Two: when something's wrong, don't go changing five things at once — every change brings its own waiting time and you quickly lose track of what was what. Calmly check your records for typos, wait out the TTL and only then test again.

Common mistakes

  • Trying to put a port in the A record. That field simply doesn't exist; ports belong in the SRV record.
  • Forgetting the SRV record with a non-standard port. "An A record worked for my friend too" — then that server ran on 25565. Any other port needs the SRV record.
  • An IP address as the SRV target. The target field expects a hostname. Create the A record first and point the SRV record at it.
  • Leaving proxy or CDN features switched on. Some DNS providers can route traffic through their own network; that's meant for websites and breaks Minecraft traffic. Set records for your server to "DNS only".
  • Testing too early. Your own PC may still have the old answer in its cache. Wait out the TTL before concluding it doesn't work.

One subdomain per server

If you run several servers — or you're growing towards a network — a domain immediately gives you structure: survival.yourdomain.com, creative.yourdomain.com, skyblock.yourdomain.com, each with its own A and SRV record to the right server and port. If you later build a network with a proxy like Velocity, the main address becomes the entrance for everything and you can use subdomains to drop players straight onto the right backend server. The principle stays the same in every case: A record for the IP, SRV record for the port.

No server yet to hang a domain on? A Minecraft server at MC-Node starts from €0.50 per month (count on around €1.10 per GB of RAM) and runs on our own hardware with NVMe storage in the Previder data centre in Hengelo, DDoS protection included and cancellable monthly. You'll find the IP and port for your DNS records right in your panel.

Further reading

// TRY IT YOURSELF
Your Minecraft server online in 60 seconds
View packages →