How to Use Your Own Domain for a Minecraft Server (A + SRV Records)
142.93.71.18:25611 is hard to remember and looks sketchy. play.yourserver.com is easy to share and looks like a real server. It also means you can move hosts later without telling every player a new IP. Setting it up takes about five minutes and a domain you own.
mc.yourdomain.com to your server's IP, and an SRV record named _minecraft._tcp.play pointing to mc.yourdomain.com on your server's port. Players then join with just play.yourdomain.com, no port needed. If your server uses the default port 25565, the A record alone is enough. On Cloudflare, set the A record to DNS only (grey cloud), not proxied.What you need
- A domain name. Cloudflare, Namecheap, Porkbun and GoDaddy all sell them, usually $10 to $15 a year for a
.com. - Your server's IP and port. In your hosting panel, it's shown as something like
142.93.71.18:25611. The part after the colon is the port.
The two records, explained
A record: links a name to an IP address. On its own, players would still need to type the port: mc.yourdomain.com:25611.
SRV record: tells Minecraft "for this name, connect to this host on this port". That's what lets players leave the port off. Java Edition looks for an SRV record automatically when you join.
So the plan is:
| Type | Name | Points to |
|---|---|---|
| A | mc |
142.93.71.18 (your server IP) |
| SRV | _minecraft._tcp.play |
mc.yourdomain.com, port 25611 |
Players join with play.yourdomain.com.
Using the default port 25565?
Then you can skip the SRV record. Minecraft tries port 25565 by default, so an A record named play pointing to your IP is all you need.
Setting it up on Cloudflare
- Go to your domain, then DNS > Records > Add record.
- A record: Type
A, Namemc, IPv4 address = your server IP. Click the orange cloud so it turns grey (DNS only). Save. - SRV record: Type
SRV, then fill in:- Name:
_minecraft._tcp.play - Priority:
0, Weight:5 - Port: your server port (for example
25611) - Target:
mc.yourdomain.com
- Name:
- Save.
Why the grey cloud matters: Cloudflare's orange-cloud proxy only handles websites. Minecraft traffic can't pass through it, so a proxied record will make your server unreachable.
Namecheap, GoDaddy and others
Every DNS provider has the same two record types; the boxes just look different.
- Namecheap: Domain List > Manage > Advanced DNS > Add New Record. For SRV, the Service is
_minecraft, Protocol_tcp, Hostplay. - GoDaddy: DNS > Add New Record > SRV. Service
_minecraft, Protocol_TCP, Nameplay, Priority 0, Weight 5, Port = your port, Targetmc.yourdomain.com.
Some providers want the target with a dot on the end (mc.yourdomain.com.). If yours shows that format, follow it.
Test it
DNS changes usually work within a few minutes, sometimes up to an hour.
- In Minecraft Java, go to Multiplayer > Add Server and enter
play.yourdomain.com. - If it shows your MOTD and player count, you're done.
Not working? Check:
- The A record is DNS only, not proxied.
- The SRV record port matches your server's port exactly.
- The SRV target is the A record's name (
mc.yourdomain.com), not the IP. SRV targets can't be IP addresses. - You typed
play.yourdomain.comwith no port.
What about Bedrock players?
Bedrock Edition doesn't read SRV records. Bedrock players (phone, Xbox, PlayStation, Switch) need the name from the A record plus the Bedrock port typed in separately. If you run Geyser crossplay, give Bedrock players mc.yourdomain.com and your Geyser port. See setting up Geyser crossplay and joining custom servers on console.
Bonus: switching hosts is painless
With your own domain, moving to a new host only means changing the IP and port in these two records. Your players keep using the same address. See how to move your server to a new host.
On FreaksMC, every server comes with a free subdomain (yourname.freaksmc.com). Just ask and we set it up for you. If you want your own domain instead, email [email protected] and we'll tell you the exact records to add.
Want a server that just runs fast?
FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.
See plans from $3/mo