Set Up a Custom Domain with SRV Record for Minecraft
How to use a custom domain (play.yourdomain.com) to connect to your Minecraft server without a port number.
An SRV record lets players connect using a clean domain (e.g., play.yourserver.com) instead of an IP and port number.
What You Need
- A domain name you own
- Access to your domain's DNS settings (usually through your registrar: Cloudflare, Namecheap, GoDaddy, etc.)
- Your server IP and port from the XGamingServer Panel
Setting Up the SRV Record
In your DNS provider, create:
An A Record:
| Type | Name | Value | TTL |
|---|---|---|---|
| A | play | your.server.ip | 3600 |
An SRV Record:
| Type | Name | Priority | Weight | Port | Target |
|---|---|---|---|---|---|
| SRV | _minecraft._tcp.play | 0 | 5 | 25565 | play.yourdomain.com |
Replace 25565 with your actual server port if different.
How It Works
Instead of connecting to 192.168.1.1:25565, players type play.yourdomain.com in Minecraft's multiplayer menu — no port number needed.
DNS Propagation
After creating the records, wait 5–30 minutes for DNS to propagate. Some providers take up to 48 hours.
Troubleshooting
| Issue | Fix |
|---|---|
| Domain not resolving | Check A record points to correct IP. Wait for DNS propagation. |
| "Can't connect" with domain but IP works | Verify SRV record format — _minecraft._tcp prefix is required |
| Wrong port | SRV record port must match your server's actual port |
📝 Note: SRV records only work for Minecraft Java Edition. Bedrock Edition does not support SRV records.
Related Guides
How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server