How to use your own domain for a Minecraft server (SRV record)
Point play.yourdomain.com at your Minecraft Java server with A and SRV DNS records so players can join without typing a port.
Updated · 2 min read
If you own a domain, you can let players join with an address like play.example.com instead of an IP and port. You set this up at your domain's DNS provider (your registrar, Cloudflare and so on) with an SRV record that tells Minecraft which host and port to use. Schokr does not need any changes.
What you need
- A domain you control, and access to its DNS settings.
- Your server address from the Schokr console, for example
203.0.113.10:25612ornode.example.net:25612. You need the host part and the port part.
Step 1: Make sure you have a hostname to target
An SRV record must point to a hostname, not an IP address.
- If your server address is a hostname, you can use it directly as the SRV target. Skip to step 2.
- If your server address is an IP, create an A record first:
| Type | Name | Value |
|---|---|---|
| A | mc | 203.0.113.10 (your server IP) |
This creates mc.example.com pointing at your server. If you use Cloudflare, set this record to DNS only (grey cloud). Cloudflare's proxy does not carry Minecraft traffic and the connection will fail.
Step 2: Create the SRV record
| Field | Value |
|---|---|
| Type | SRV |
| Service | _minecraft |
| Protocol | _tcp |
| Name | play (the subdomain players type) |
| Priority | 0 |
| Weight | 5 |
| Port | 25612 (your server's port) |
| Target | mc.example.com (or your server's hostname) |
Some DNS providers have separate Service and Protocol fields. Others want the whole name in one field: _minecraft._tcp.play. In zone file format it looks like this:
mc.example.com. 3600 IN A 203.0.113.10
_minecraft._tcp.play.example.com. 3600 IN SRV 0 5 25612 mc.example.com.
To use the bare domain (example.com) instead of play, use _minecraft._tcp as the name, or @ for the name part depending on your provider.
Step 3: Test it
DNS changes usually apply within minutes but can take longer. Then in Minecraft, add a server with the address play.example.com and no port.
To check the record from a terminal:
nslookup -type=SRV _minecraft._tcp.play.example.com
Things to know
- SRV records only work for Java Edition. Bedrock players connecting through Geyser still need the hostname and port.
- If you move or recreate your server, its IP or port may change. Update the A and SRV records.
- The record does not hide your server's IP. Anyone can look up the DNS records.
- Your server keeps working with its original address too.
Not working?
- The SRV target must be a hostname, with no port and no
http://. - The port in the SRV record must match the port from the Schokr console.
- Check the A record is not proxied if you use Cloudflare.
- Clear the Minecraft server entry and add it again, as some clients cache old lookups.
Also see connecting to your Minecraft server.