How to Set Up a Custom Domain for Your Minecraft Server
Replace your numeric Minecraft server IP with a custom domain like play.yourserver.com using A and SRV DNS records.
A custom domain like play.yourserver.com is easier to share, looks more professional, and lets you change hosting providers later without your players needing a new IP. You set it up with two DNS records: an A record (maps domain → IP) and optionally an SRV record (lets you hide a non-default port).
Most-asked question: Do I need an SRV record? Only if your server uses a port other than 25565. With the default port, an A record alone is enough.
What You Need
- A domain you own (Cloudflare, Namecheap, GoDaddy, Porkbun, etc.)
- Your server's IP address and port from the Network tab in the XGamingServer Panel
- Access to your domain's DNS management page
Set Up the Domain
Get your server IP and port
In the panel, click Network in the sidebar. Note:
- IP address (e.g.,
123.45.67.89) - Port (e.g.,
25565— but it might be different)
Log in to your registrar's DNS page
Go to your domain registrar (where you bought the domain) and find the DNS or DNS Management section.
Create an A record
Add a new record with these settings:
| Field | Value |
|---|---|
| Type | A |
| Name / Host | play (or whatever subdomain you want — mc, server, @ for root domain) |
| Value / Target | Your server's numeric IP from step 1 |
| TTL | Auto, or 3600 (1 hour) |
| Proxy (Cloudflare only) | DNS only (grey cloud) — never proxied |
Cloudflare warning: If you use Cloudflare DNS, the record must be set to DNS only (grey cloud). Cloudflare's HTTP proxy (orange cloud) cannot tunnel Minecraft traffic. Players will get connection errors if it's proxied.
(Optional) Create an SRV record for non-default ports
Skip this step if your port is 25565. If your port is anything else and you want players to connect without typing the port, add:
| Field | Value |
|---|---|
| Type | SRV |
| Name / Host | _minecraft._tcp.play |
| Service | _minecraft |
| Protocol | _tcp |
| Priority | 0 |
| Weight | 5 |
| Port | Your actual server port |
| Target | play.yourserver.com (the A record you created) |
| TTL | Auto, or 3600 |
Now players can connect with just play.yourserver.com — no port needed.
Wait for DNS propagation
DNS changes can take 15 minutes to 48 hours to propagate worldwide. Most providers update in 5–30 minutes.
Test propagation with:
nslookup play.yourserver.comThe IP returned should match your panel's Network IP.
Test in Minecraft
Open Minecraft → Multiplayer → Add Server, and enter play.yourserver.com. The server should appear with full ping.
A Record vs SRV Record
| Use case | Records you need |
|---|---|
| Default port 25565 | A record only |
| Non-default port, players type the port | A record only |
| Non-default port, hide it from players | A record + SRV record |
| Multiple servers behind one domain | A record + multiple SRV records |
Cloudflare-Specific Setup
Cloudflare is the most common gotcha. The required settings:
| Setting | Value |
|---|---|
| Record type | A |
| Proxy status | DNS only (grey cloud) |
| TTL | Auto |
If you see the orange cloud icon, click it to toggle to grey. Otherwise the connection silently fails.
For SRV records on Cloudflare, use Cloudflare's split SRV form (Service, Protocol, Name fields are separate — don't combine them into one).
Common Mistakes
| Mistake | Fix |
|---|---|
| Cloudflare orange cloud (proxied) | Toggle to grey cloud (DNS only) |
| A record points to old IP | Update value to current panel IP |
| SRV record's Target doesn't match the A record | They must match exactly |
| Forgot to wait for propagation | Wait 15–30 minutes minimum |
Used https:// or www. in the value | Just the IP — no protocol prefix |
| Players still type the port | They cached the old address — clear server list |
| Used wrong subdomain in SRV Name | Must be _minecraft._tcp.<your_subdomain> |
Verify with Online Tools
- https://dnschecker.org — see propagation across the world
- https://mcsrvstat.us — checks both A and SRV records and pings the server
Related Guides
How is this guide?
