العربية Game Panel Client Area

Guides · Game servers

Connect a Custom Domain to Your Minecraft Server Using Cloudflare SRV Records

Step-by-step guide to pointing play.yourdomain.com to your Minecraft Java server (even on non-25565 ports) using Cloudflare A and SRV DNS records.

Updated by Slime Host Technical Team on 25/11/2026

Sharing a clean address like play.yourdomain.com looks far more professional than a raw IP and port, and it lets you migrate servers later without forcing players to re-add a new IP. Because Minecraft Java Edition supports DNS SRV records, players will not even need to type :port if your server runs on a custom port.

1. Before You Start

Make sure you have:

  • A domain managed in Cloudflare (free plan works).
  • Your Minecraft server’s IPv4 address and port (shown at the top of the Slime Host game panel, e.g. 192.0.2.50:25580).

Important: Minecraft traffic is not HTTP, so Cloudflare’s orange proxy cloud must be turned OFF (DNS Only / Grey Cloud) on the A record. If the orange cloud is enabled, players will get a connection error.

2. Create the A Record

  1. Log in to the Cloudflare Dashboard and select your domain.
  2. Open DNS → Records → Add record.
  3. Fill in the fields:
    • Type: A
    • Name: mc (or play if you want play.yourdomain.com directly without an SRV record on port 25565)
    • IPv4 address: Your server’s IP (without the port)
    • Proxy status: DNS Only (Grey cloud — very important)
    • TTL: Auto
  4. Click Save.

If your server uses the default port 25565, you can name the A record play and stop here—players can already join using play.yourdomain.com. If your server uses a custom port (like 25580), continue to Step 3 to hide the port.

3. Create the SRV Record (Hide Custom Ports)

  1. Click Add record again in Cloudflare DNS.
  2. Select Type: SRV and enter:
    • Name: play (if you want players to connect via play.yourdomain.com; use @ for the root domain yourdomain.com)
    • Service: _minecraft
    • Protocol: TCP
    • TTL: Auto
    • Priority: 0
    • Weight: 5
    • Port: Your server’s exact port (e.g. 25580)
    • Target: The A record hostname you created in Step 2 (e.g. mc.yourdomain.com)
  3. Click Save.

4. Verify Your Domain Live

DNS changes on Cloudflare usually propagate within 1 to 5 minutes. You can verify that your domain resolves and responds properly using our free Minecraft Server Status Checker:

  1. Open /tools/minecraft-status.
  2. Enter play.yourdomain.com (without any port).
  3. If the A and SRV records are configured correctly, you will see your server Online, along with its live player count, MOTD, and resolved IP:Port.

You can also test from a terminal with dig:

dig +short SRV _minecraft._tcp.play.yourdomain.com

Expected output:

0 5 25580 mc.yourdomain.com.

5. Common Mistakes & Fixes

  • ”Unknown host” or connection refused: Check that the A record is set to DNS Only (Grey Cloud), not Proxied (Orange Cloud).
  • Players still have to type :port: Double-check that Service is _minecraft (with the leading underscore) and Protocol is TCP, and that Target points to mc.yourdomain.com (never an IP address—RFC requires a hostname in SRV targets).
  • Bedrock Edition players: Minecraft Bedrock does not support SRV records. Bedrock players only need the A record (play.yourdomain.com) plus the Bedrock port (default 19132).

Frequently Asked Questions

Does using a Cloudflare DNS record hurt server ping?
No. Because DNS Only mode returns your real server IP directly to the player’s Minecraft client, zero traffic passes through Cloudflare—your ping stays identical to connecting by IP.

All guides