In short: create an A record that points play.example.com at the server's IP. If the server listens on port 25565, that's it — players type play.example.com. On any other port, add an SRV record _minecraft._tcp.play.example.com with that port and the target play.example.com: Java Edition has read the port from it since 1.3.1. Bedrock doesn't support SRV records — players there type the port themselves.
A record or SRV
| Record | What it holds | When you need it |
|---|---|---|
| A | Name → the server's IPv4 address | Always: both the address itself and the SRV record rely on it |
| SRV | Priority, weight, port and target — a name with an A record | The server isn't on 25565 and players should type the address without a port |
An A record can't hold a port — only an address. So without SRV a server on port 25570 is only reachable as play.example.com:25570. SRV doesn't replace the A record, it builds on it: it holds not an IP but a name that needs its own A record.
Default port: an A record is enough
- 1
Pick a name
Usually a subdomain —
play,mcor the game mode's name: the bareexample.comis often already taken by a website. - 2
Create the A record
In your registrar's or DNS host's panel: type A, name
play, value — the server's public IP. On hosting the panel shows the IP; at home, your router or any "what is my IP" site. - 3
Wait and check
The Minecraft Wiki suggests waiting up to 10 minutes after creating the record, then checking it with a command from the checking section below.
Non-default port: the SRV record
The game looks for the SRV record strictly at _minecraft._tcp.<the domain the player types>. For the address play.example.com that's _minecraft._tcp.play.example.com, for the bare domain _minecraft._tcp.example.com. The record's fields per RFC 2782:
| Field | What to enter |
|---|---|
| Name | _minecraft._tcp.play — service and protocol with underscores, plus your subdomain |
| Priority | 0. The client picks the target with the lowest priority; with one server the value doesn't matter |
| Weight | 0. The RFC advises 0 when there's no choice between servers to make |
| Port | The server's port from server-port, e.g. 25570 |
| Target | A name with an A record, e.g. play.example.com. Not an IP and not a CNAME: per RFC 2782 the target must have address records and must not be an alias |
; default port: players type play.example.com
play.example.com. 300 IN A 203.0.113.10
; non-default port 25570: the SRV record tells the game the port
_minecraft._tcp.play.example.com. 300 IN SRV 0 0 25570 play.example.com.The target can be the same name the player types: play.example.com with an A record, and an SRV record pointing at that very name with the right port. Some panels have separate fields for the service (_minecraft), protocol (_tcp) and name, and others append the zone's domain to the name for you. Whatever the form looks like, check the result with nslookup: the record must be found at exactly _minecraft._tcp.play.example.com.
TTL: how fast changes spread
TTL is how many seconds resolvers cache a record. Until the cache expires, some players still land on the old address. Cloudflare's Auto value is 300 seconds, and on regular plans you can set anything from 60 seconds to a day by hand. The Minecraft Wiki warns that, depending on the player's resolver, changes can take "a day or so" to arrive.
A short TTL matters before a move: lower it in advance, at least by the old TTL, and an IP change will spread quickly — the order of steps is in moving a server. Once the address settles, you can raise the TTL again.
How to check the records
nslookup -q=a play.example.com
nslookup -q=srv _minecraft._tcp.play.example.com
dig play.example.com A +short
dig _minecraft._tcp.play.example.com SRV +short
# SRV answer: 0 0 25570 play.example.com.- The A record isn't found — check the name in the panel and wait: new records don't show up instantly.
- The SRV record isn't found — usually a typo in the name: missing underscores, the domain doubled at the end, or a different subdomain from the one players type.
- The records are right but the game can't connect — DNS isn't the problem: check that the port is open and forwarded using server IP and port.
A domain for a network behind Velocity
In a server network players connect to the proxy, so the domain points at the Velocity machine. By default Velocity listens on port 25565 on every address of the machine — then A records are enough and you don't need SRV. Don't publish the servers behind the proxy in DNS: their ports must be closed by the firewall, see Velocity setup.
The [forced-hosts] section of velocity.toml sends a player to a specific server by the name they typed. Mind an SRV subtlety: per the Minecraft Wiki, on login the client tells the server the name obtained after SRV resolution — the record's target — while the server list ping carries the name the player typed. If several subdomains point via SRV at the same target, the proxy can't tell them apart. It's safer to keep Velocity on 25565 without SRV, or to make each SRV record's target that same subdomain.
# DNS: both names point at the Velocity machine (port 25565)
mc.example.com. A 203.0.113.10
survival.example.com. A 203.0.113.10
# velocity.toml
[forced-hosts]
"survival.example.com" = ["survival"]The stock velocity.toml already has forced-hosts examples with the servers lobby, factions and minigames — delete them or replace them with your own. Choosing a proxy is covered in Velocity or BungeeCord.
Bedrock: SRV doesn't work
The Minecraft Wiki lists missing SRV support among the Bedrock server's limitations: players can connect by domain, but they enter the port themselves. The default is 19132 — the same port Geyser uses by default for Bedrock players joining a Java server. So for Bedrock an A record is all you need, and the server description should give the address and port separately. More in Geyser and Bedrock.
Cloudflare and free subdomains
- Cloudflare: DNS only. Cloudflare's proxy (the orange cloud) only handles A, AAAA and CNAME records serving HTTP and HTTPS; TCP applications are proxied only by a separate product, Spectrum. Set the game address to DNS only (grey cloud); SRV records are never proxied.
- A free subdomain. A subdomain from a host or a dynamic DNS service is handy to start with, but the address isn't yours: it can be taken back or the rules can change. Before you hand it out, check that you can create an SRV record there if your port isn't the default.
- A dynamic IP. If your home IP changes, the Minecraft Wiki suggests a dynamic DNS service: it updates the record for you.
The domain and the anticheat
A nice address ends up on server lists, in videos and in chats — and brings in cheaters along with players. Better to be ready in advance. DGuard — the best anticheat for a modern Minecraft server — catches cheats in combat, movement, packets, inventory, building and the world, and works behind Velocity and BungeeCord: it goes on each game server with its own key. The key isn't tied to a domain or IP — when the address changes or you move, it travels with the plugins folder. Up to 30 players online DGuard is free, with the same protection as the paid plans.
FAQ
How do I make a Minecraft server address without a port?
On port 25565 a domain A record is enough. On any other port add an SRV record _minecraft._tcp.<domain> with that port and a target — a name with an A record. Java Edition finds the port itself and the player types only the domain.
Why isn't my SRV record working?
Check the record's name (_minecraft._tcp. in front of exactly the domain players type), that the target is a name with an A record rather than an IP or CNAME, and wait out the TTL. To check: nslookup -q=srv _minecraft._tcp.<domain>.
Do SRV records work for Bedrock?
No. The Bedrock client connects by domain, but the player enters the port by hand; the default is 19132.
Can I put my Minecraft server domain behind Cloudflare's proxy?
No: Cloudflare's proxy handles HTTP and HTTPS, and TCP applications only through Spectrum. Set the game address to DNS only.
How long until a new address works?
A new record usually shows up within minutes, and a change to an existing one once its TTL runs out; the Minecraft Wiki warns that with some resolvers this takes up to a day.
Sources
- Minecraft Wiki: setting up a Java Edition server (A, SRV, checking)
- Minecraft Wiki: the Handshake packet (name after SRV)
- Minecraft Wiki: Bedrock Dedicated Server (limitations)
- RFC 2782: the DNS SRV record
- Cloudflare: DNS record TTL
- Cloudflare: proxying limitations
- Geyser: setup (port 19132)
- Velocity: configuration (bind, forced-hosts)
- Velocity: the default velocity.toml
- BIND 9: dig and the +short option
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions