How to Set Up a Custom Domain for Your Minecraft Server
Learn how to use a custom domain name instead of a numeric IP address for your server.
Instead of sharing a numeric IP like 192.168.1.1:25565, you can use a custom domain like play.myserver.com. This is done with DNS records at your domain registrar.
📝 Note: If you just need a subdomain (like
mc.yourdomain.com), check if your registrar supports SRV records. If you already have an SRV record guide, see Setting Up an SRV Record.
Setting Up a Custom Domain
Get your server IP and port
Access the XGamingServer panel and note your server's IP address and port from Network.
Log in to your domain registrar
Go to your DNS management page (Cloudflare, Namecheap, GoDaddy, etc.).
Create an A record
Add a DNS record:
- Type: A
- Name:
play(or whatever subdomain you want) - Value: Your server's numeric IP address
- TTL: Auto or 3600
Create an SRV record
If your server doesn't use port 25565 (the default), you need an SRV record:
- Type: SRV
- Name:
_minecraft._tcp.play - Priority: 0
- Weight: 5
- Port: Your actual server port
- Target:
play.yourdomain.com
Wait for DNS propagation
DNS changes can take up to 48 hours to propagate globally, though most update within 15-30 minutes.
Test the connection
Try connecting to play.yourdomain.com in Minecraft.
💡 Tip: If you're using Cloudflare, make sure the A record has the proxy disabled (grey cloud, DNS only). Minecraft traffic can't go through Cloudflare's HTTP proxy.
⚠️ Warning: If your server uses a non-standard port and you skip the SRV record, players will need to include the port:
play.yourdomain.com:12345.
See also: Setup SRV Record | Connect to Your Server
If you need help, join our Discord.
How is this guide?
