Minecraft SRV Record: Let Players Join Without a Port
A Minecraft SRV record lets Java players type a plain domain while the game quietly finds your custom port. Here is the exact record, the mistakes that break it, and how to verify it.

Infrastructure & Support Team
On this page
A Minecraft SRV record is a DNS entry that tells the Java client which host and port to connect to, so players can type play.example.com instead of play.example.com:25577. You create it under the name _minecraft._tcp in front of your domain, point it at a hostname that has an A record, and put your real server port in the record. That is the whole trick.
You only need it when your server is not on the default port, 25565. If you run several servers on one machine, or your host gave you an unusual port, an SRV record is how you keep the address short and memorable. Below: the exact fields, a worked example, Cloudflare specifics, and how to test it before you share the address.
How a Minecraft SRV record works#
Since Java Edition 1.3.1 the game can read a server's address and port from a DNS SRV record, according to the Minecraft Wiki's server tutorial. When a player types play.example.com, the client first asks DNS for _minecraft._tcp.play.example.com. If an SRV record exists, it reads the target host and port from it. If not, it falls back to the A record and port 25565.
So two records cooperate:
- An A record that maps a hostname to your server's IP address.
- An SRV record that says "for the Minecraft service on this domain, connect to that hostname on this port".
The SRV record cannot point at a raw IP, and it should not point at a CNAME. The target must be a hostname that resolves through an A (or AAAA) record. Our docs have a page on A records if you need the basics first.
What fields does a Minecraft SRV record need?#
An SRV record has six pieces. Most DNS dashboards split them into separate boxes:
| Field | Value | Meaning |
|---|---|---|
| Service | _minecraft |
The service name the Java client looks for |
| Protocol | _tcp |
Minecraft Java uses TCP |
| Name | play |
What players type, without the root domain |
| Priority | 0 |
Lower is tried first; only matters with several records |
| Weight | 5 |
Used to split traffic among equal-priority records |
| Port | 25577 |
Must match server-port in server.properties |
| Target | mc.example.com |
Hostname with an A record |
In zone-file notation the same record looks like this:
_minecraft._tcp.play.example.com. 3600 IN SRV 0 5 25577 mc.example.com.Note the trailing dots in the zone-file form. In a dashboard you usually leave them out, though some providers accept either. LordCloud's SRV records documentation shows the same layout for our customers.
Step by step: create the records#
Say your domain is example.com, your server IP is 203.0.113.10 and the server listens on port 25577.
Step 1: make sure the server port matches#
Open server.properties and check the port line:
server-port=25577On a managed panel the port is usually assigned to you, so read it from the dashboard instead of changing it. The port in the SRV record must be exactly the one the server actually listens on.
Step 2: add the A record#
| Type | Name | Value |
|---|---|---|
| A | mc |
203.0.113.10 |
Step 3: add the SRV record#
Create the SRV record with service _minecraft, protocol _tcp, name play, priority 0, weight 5, port 25577 and target mc.example.com.
Players can now connect with play.example.com. You can use any name, including the bare domain: leave the name empty (or @) and the lookup becomes _minecraft._tcp.example.com, so players type example.com.
Minecraft SRV record on Cloudflare#
Cloudflare is where most people trip, so here are the two rules.
The SRV record is never proxied. Cloudflare's documentation states that A, AAAA and CNAME records are the only types you can proxy; everything else is DNS only. SRV falls in the second group, so nothing to toggle there.
The A record must be DNS only (grey cloud). If the target's A record is set to proxied (orange cloud), DNS returns a Cloudflare address instead of your server IP, and the free proxy does not carry Minecraft's game traffic. Players then see "can't connect to server" or a timeout. Switch the A record to grey.
When you create an SRV record through Cloudflare's API, the service and protocol are folded into the record name (their own example uses _xmpp._tcp.example.com) and priority, weight, port and target go inside a data object. See Cloudflare's record type reference. The dashboard hides that and gives you boxes. LordCloud also has a short page on Cloudflare integration.
One honest trade-off: a grey-cloud A record exposes your server IP to anyone who looks it up. Your host's network-level DDoS protection is then the thing standing between that IP and attackers; here is what DDoS protection covers on LordCloud.
How do I test a Minecraft SRV record?#
Do not test by restarting the game over and over. Query DNS directly:
dig +short _minecraft._tcp.play.example.com SRVA healthy answer looks like this:
0 5 25577 mc.example.com.Then confirm the target resolves:
dig +short mc.example.com AYou should get your server IP, not a Cloudflare one. On Windows, nslookup -type=SRV _minecraft._tcp.play.example.com does the same job.
If you get nothing back, wait. DNS caches can hold an old negative answer for a while, depending on the record TTL. Lowering the TTL to a few minutes before making changes saves you waiting later.
Common mistakes that break SRV records#
- Wrong name. The lookup name is fixed:
_minecraft._tcp.<name>. The underscores matter.minecraft.tcp.playwill never be found. - Including the domain twice. Some dashboards append the root domain automatically. If your record ends up as
_minecraft._tcp.play.example.com.example.com, remove the extra part. - Target is an IP address. SRV targets must be hostnames. Create an A record and point to that.
- Target is a CNAME. The DNS standard says not to do this, and some resolvers fail on it. Point at a hostname with a direct A record.
- Port mismatch. If the SRV says 25577 and the server listens on 25570, the connection is refused.
- Firewall. The port must be open for TCP. On a VPS, check the firewall configuration guide; on a game panel, make sure the port is actually assigned to your server. For the TCP and UDP basics see TCP and UDP ports.
- Bedrock players. SRV is a Java Edition feature. Bedrock ignores it, so Bedrock players type address and port. If you run Geyser for crossplay, read Java and Bedrock connectivity.
When you do not need an SRV record#
If your server runs on 25565, skip all this: players type the domain and the client uses 25565. An SRV record is also pointless if you only share the address with a few friends who will paste ip:port once.
It earns its place when you run more than one server on one IP (for example survival.example.com and creative.example.com, each with its own port), when you want a stable address that survives moving to a new IP, or when your host assigns a non-default port. Changing the A record later moves every player at once; nobody needs a new address.
If you are choosing where to run it, our Minecraft server hosting plans list the ports and resources per plan, and a slow server is usually not a DNS problem; our post on ping, jitter and packet loss shows how to measure first.
Summary checklist#
- Confirm the real server port.
- Create an A record for a hostname such as
mc, DNS only. - Create the SRV record:
_minecraft,_tcp, your chosen name, port, target. - Check with
dig +short _minecraft._tcp.play.example.com SRV. - Join from a Java client using only the domain.
Keep the TTL low while you test, then raise it once everything works.
Frequently asked questions
What is a Minecraft SRV record?
A DNS record that tells Minecraft Java Edition which hostname and port to connect to for a domain. The game looks it up at _minecraft._tcp.<your domain>, so players can type a domain with no port.
Do SRV records work for Minecraft Bedrock?
No. Bedrock ignores SRV records, so Bedrock players must enter the address and port separately. The Geyser crossplay docs cover the Bedrock port.
Can I proxy a Minecraft SRV record through Cloudflare?
No. Cloudflare can only proxy A, AAAA and CNAME records, so an SRV record is always DNS only. The A record its target points to must also be DNS only (grey cloud), or the game gets a Cloudflare address instead of your server.
Why is my SRV record not working?
Common causes are a wrong name (it must start with _minecraft._tcp), a target that is an IP or CNAME instead of a hostname with an A record, a port that does not match server-port, or DNS that has not propagated yet. Test with dig.
Do I need an SRV record if my server uses port 25565?
No. 25565 is the default Java port, so players can connect with just the domain. An SRV record only matters when you use a different port.
References
Drafted with AI assistance and checked against LordCloud's published product information. Spotted a mistake?Suggest an edit.



