SRV Records for Minecraft Servers Explained
Learn what SRV records are, how they work with Minecraft Java Edition, and how to set them up so players can connect without typing a port number.
What Are SRV Records?
SRV (Service) records are a type of DNS record that tells clients where a specific service is hosted, including the port number. For Minecraft, srv records minecraft Java Edition clients use allow players to connect to play.example.com instead of play.example.com:25567. The SRV record tells the game client which port and hostname to use behind the scenes.
When You Need SRV Records
You need srv records minecraft if:
- Your server runs on a non-standard port (anything other than 25565).
- You use a shared hosting provider that assigns a random port.
- You want a clean domain name without a port suffix.
- You run multiple servers on the same IP with different ports.
If your server runs on port 25565, you technically do not need an SRV record. The Minecraft client defaults to port 25565 when no port is specified.
How to Create an SRV Record
Go to your DNS provider's dashboard and create a new SRV record with these values:
| Field | Value |
|---|---|
| Service | _minecraft |
| Protocol | _tcp |
| Name | play.example.com (or @ for root domain) |
| Priority | 0 |
| Weight | 5 |
| Port | Your server's port (e.g., 25567) |
| Target | Your server's hostname (e.g., node1.example.com) |
The full record name is _minecraft._tcp.play.example.com. Some DNS providers assemble this from separate fields, others want you to type it out.
Verifying Your SRV Record
Use the nslookup or dig command to check:
dig SRV _minecraft._tcp.play.example.com
You should see a response containing your target hostname and port. DNS propagation can take a few minutes to a few hours.
Common Mistakes
- Wrong service name: It must be
_minecraft, notminecraftormc. - Wrong protocol: Always
_tcp. Minecraft Java uses TCP. - Target is an IP instead of hostname: SRV records should point to a hostname (A record), not directly to an IP address.
- Missing A record for target: The target hostname must resolve to an IP via its own A record.
SRV Records and Bedrock
Minecraft Bedrock Edition does not support srv records minecraft Java Edition uses. Bedrock clients require a direct IP and port. If you support both editions, use the SRV record for Java and provide the direct IP:port for Bedrock players.
For setting up a clean domain for your server, see custom domain setup. If you need dynamic DNS because your IP changes, check our dynamic DNS guide.
Need a proxy-ready network? Astroworld Hosting supports Velocity, BungeeCord, and multi-server setups on every plan.