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:

FieldValue
TypeA
Name / Hostplay (or whatever subdomain you want — mc, server, @ for root domain)
Value / TargetYour server's numeric IP from step 1
TTLAuto, 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:

FieldValue
TypeSRV
Name / Host_minecraft._tcp.play
Service_minecraft
Protocol_tcp
Priority0
Weight5
PortYour actual server port
Targetplay.yourserver.com (the A record you created)
TTLAuto, 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.com

The IP returned should match your panel's Network IP.

Test in Minecraft

Open Minecraft → MultiplayerAdd Server, and enter play.yourserver.com. The server should appear with full ping.

A Record vs SRV Record

Use caseRecords you need
Default port 25565A record only
Non-default port, players type the portA record only
Non-default port, hide it from playersA record + SRV record
Multiple servers behind one domainA record + multiple SRV records

Cloudflare-Specific Setup

Cloudflare is the most common gotcha. The required settings:

SettingValue
Record typeA
Proxy statusDNS only (grey cloud)
TTLAuto

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

MistakeFix
Cloudflare orange cloud (proxied)Toggle to grey cloud (DNS only)
A record points to old IPUpdate value to current panel IP
SRV record's Target doesn't match the A recordThey must match exactly
Forgot to wait for propagationWait 15–30 minutes minimum
Used https:// or www. in the valueJust the IP — no protocol prefix
Players still type the portThey cached the old address — clear server list
Used wrong subdomain in SRV NameMust be _minecraft._tcp.<your_subdomain>

Verify with Online Tools

How is this guide?

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

On this page