10+ free guides · no login, no paywall
LEGIONMC
administration

How to Use a Custom Domain for Your Minecraft Server

MrPumpkin
MrPumpkin
July 1, 20265 min read
administrationserverdomain
How to Use a Custom Domain for Your Minecraft Server

If you followed the VPS guide, your server has an address. It's probably something like 192.0.2.14:25565, and it's about as easy to remember as your locker combination from three schools ago. A custom domain fixes that. Instead of texting your friends a string of numbers, you hand them something like play.yourname.com and they're in.

This is a DNS project, not a coding project. You won't touch a terminal, just a handful of form fields filled out in the right order.

Why Bother With a Custom Domain

A few reasons, none of them complicated. A domain is easier to type, easier to remember, and doesn't change every time you restart your router or switch hosts (as long as you update the DNS record when it does). It also just looks more legit. "Join mc.yourname.com" reads a lot better than reciting an IP address like a phone number from 2003.

What's an SRV Record, and Why Do I Need One

Normally, if you want players to reach your server through a domain, they'd have to type the domain and the port together, like mc.yourname.com:25565. An SRV record gets rid of that second step.

An SRV record is a small DNS entry that tells Minecraft "hey, for this domain, the actual game server lives over here, on this port." Set one up and your friends can just type mc.yourname.com with no port at all. Minecraft looks up the SRV record automatically and finds the rest.

Before You Start

You'll need three things:

  1. A domain name you own (from GoDaddy, Namecheap, Cloudflare, or anywhere else).
  2. Your server's IP address, and its port if it's not the default 25565.
  3. Access to that domain's DNS settings.

Pick whichever provider matches where your domain actually lives. If you're not sure which one to use for a brand-new domain, go with Cloudflare. It's free, fast, and has the friendliest DNS dashboard of the bunch.

What If You're on Aternos?

Aternos is a legitimate way to run a free server, no credit card required. The address it hands you, though, something like frostyshire4821.aternos.me, reads more like a receipt number than a Minecraft server.

Aternos assigns your server a new IP address every time it restarts, which is how it keeps a free service running for everyone. A static A record has nothing fixed to point at, so the Cloudflare, GoDaddy, and Namecheap steps below won't work here.

Aternos solves this its own way: you delegate a subdomain to its nameservers with two NS records, then register that subdomain on your Aternos dashboard, so it can keep updating where the domain points every time your server restarts. It's a different process from the rest of this guide, and it only works while you're hosting on Aternos, but it gets you off the .aternos.me address.

If you'd rather have the setup covered in this guide instead, with a domain and IP that stay put, moving to a VPS is the way to get there.

Setting Up on Cloudflare (Recommended)

  1. Add your domain to Cloudflare (or select it if it's already there) and open the DNS tab.
  2. Add an A record pointing a subdomain, like play, at your server's IP address.
  3. Add an SRV record: Service _minecraft, Protocol _tcp, Name @ (or blank), Priority 0, Weight 5, Port your server's port, Target the subdomain you made in step 2.
  4. Click the little orange cloud next to that A record so it turns grey. A proxied (orange) record routes traffic through Cloudflare's web proxy, which doesn't understand raw Minecraft traffic. Grey means DNS-only, which is what you need.
  5. Save and give it a few minutes.

Setting Up on GoDaddy

  1. Go to My Products, find your domain, and open DNS Management.
  2. Add an A record: a subdomain like play, pointed at your server's IP.
  3. Add an SRV record: Service _minecraft, Protocol _tcp, Name @, Priority 0, Weight 5, Port your server's port, Target your subdomain (something like play.yourname.com, with a trailing dot if GoDaddy asks for one).
  4. Save. GoDaddy's DNS changes are usually quick, but give it a bit of time anyway.

Setting Up on Namecheap

  1. Go to Domain List, click Manage next to your domain, then open the Advanced DNS tab.
  2. Add an A Record: Host play (or whatever subdomain you want), Value your server's IP.
  3. Add an SRV Record: Service _minecraft, Protocol _tcp, Priority 0, Weight 5, Port your server's port, Target your subdomain.
  4. Save changes and wait a few minutes for it to take effect.

Troubleshooting

It's Not Working Yet

DNS changes don't show up everywhere instantly. It usually takes a few minutes, occasionally longer if a provider is being slow that day. Grab a snack, wait a bit, then try again before assuming you broke something.

Direct IP Works But the Domain Doesn't

If typing the IP address gets you in but the domain doesn't, the SRV record is the usual suspect. Double check the service and protocol are exactly _minecraft and _tcp, the port matches your server, and the target points at the right subdomain. On Cloudflare specifically, make sure that cloud icon is grey, not orange - that one trips up almost everybody the first time, like forgetting to take the cookies out of the oven because you were too busy admiring the timer.

Keep your pumpkin lit and your diamonds close. - MrPumpkin

MrPumpkin
Written by
MrPumpkin
Servers & Mods

MrPumpkin has been terrorizing Minecraft servers since 2012, and yes, he did run one of his own. His natural habitat is Factions PvP, though he'll happily spend three hours configuring a server plugin just to make one thing work 2% better. If you need to know how to set up a modpack, tune server performance, or figure out why your Forge installation is broken, MrPumpkin is your guy.

Keep your pumpkin lit and your diamonds close.