LEVEL 3Networking

Use your own domain

Point play.example.com at the right address with A, AAAA, CNAME or SRV.

◷ About 15 minOptionalReviewed Aug 18, 2026
On this pageWhat a domain doesThe record typesA direct Java serverA non-default Java port with SRVCNAME with a tunnelCloudflare DNS versus Cloudflare TunnelVerify the result

What a domain does#

Instead of sharing 123.45.67.89:25565, you can share play.example.com. DNS tells the Minecraft client where to connect. It does not host the world or carry game traffic by itself.

The record types#

RecordMeaningMinecraft use
AName → IPv4 addressDirect home/VPS IPv4
AAAAName → IPv6 addressDirect IPv6 when fully reachable
CNAMEName → another hostnamePoint a friendly subdomain at a tunnel hostname when allowed
SRVService name → target hostname and portHide a non-default Java port behind a domain

A direct Java server#

If your public IPv4 is 203.0.113.10 and Java listens on the default port, an A record can point play.example.com to that address. Players enter play.example.com.

If the IP changes, the DNS record must be updated. Dynamic DNS software can automate this, but it is another credential-bearing service to secure.

A non-default Java port with SRV#

Suppose the server is reached at mc-target.example.net:25590, but you want players to enter play.example.com.

Create a target record/hostname, then an SRV record conceptually like:

dns
Service: _minecraft
Protocol: _tcp
Name: play
Priority: 0
Weight: 5
Port: 25590
Target: mc-target.example.net

The SRV target must be a hostname, not an IP address. DNS provider forms label these fields differently. Do not place a period or omit one unless your provider’s instructions say so.

CNAME with a tunnel#

Some tunnel products let you point a CNAME at their assigned hostname; others require a paid custom-domain feature or a specific validation process. Follow the tunnel provider’s current documentation. A DNS record cannot remove a port or protocol restriction the tunnel itself does not support.

Cloudflare DNS versus Cloudflare Tunnel#

Cloudflare DNS publishes records. The orange-cloud HTTP proxy is designed around supported web traffic and does not automatically proxy a normal Minecraft Java TCP connection.

Cloudflare Tunnel is a separate connector product commonly used for HTTP services and private access. Do not assume creating a web tunnel exposes arbitrary Minecraft traffic. Use a game-capable tunnel, a direct connection or a product explicitly documenting that protocol.

Verify the result#

  1. 1
    Keep the original working address.
  2. 2
    Add the DNS record with a short temporary TTL if appropriate.
  3. 3
    Wait for caches to update.
  4. 4
    Look up the record from another network.
  5. 5
    Join using the new name.
  6. 6
    Keep the old address until several friends have tested.
The domain resolves but Minecraft cannot connect

DNS has done its job. Check the target port, protocol, tunnel/forward, firewall and server process. A successful DNS lookup does not prove a service is reachable.

Was this page helpful?