Custom Domain

How to use a custom domain with SRV records for your Witchly.host Minecraft server.

Custom Domain

Instead of giving players a numeric IP address and port, you can use a custom domain like play.yourdomain.com to connect to your Minecraft server. This guide explains how to set up DNS records to make this work.

How It Works

Minecraft Java Edition supports SRV records, a type of DNS record that maps a domain name to a specific IP address and port. This means players can type play.yourdomain.com into their Minecraft client without needing to remember a port number.

Note: SRV records only work with Minecraft Java Edition. Bedrock Edition does not support SRV records — Bedrock players will still need the IP and port.

What You Need

  • A domain name you own (e.g., yourdomain.com).
  • Access to your domain’s DNS management panel (Cloudflare, Namecheap, GoDaddy, etc.).
  • Your Witchly server address and port (found in your dashboard at Dashboard).

Step-by-Step Setup

Step 1: Find Your Server Details

  1. Log in to Dashboard.
  2. Select your Minecraft server.
  3. Note the Server Address and Port from the overview page. For example:
    • Address: game1.witchly.host
    • Port: 25565

Step 2: Create an A Record or CNAME Record

First, point your subdomain to the Witchly server:

Option A: Using a CNAME record (recommended)

TypeNameValueTTL
CNAMEplaygame1.witchly.hostAuto/300

This creates play.yourdomain.com and points it to the Witchly server.

Option B: Using an A record

If your DNS provider does not support CNAME records for subdomains, use an A record with the IP address:

TypeNameValueTTL
Aplay(server IP address)Auto/300

You can find the IP address by pinging the server hostname or asking support.

Step 3: Create an SRV Record

The SRV record tells Minecraft which port to connect to when players use your custom domain.

FieldValue
TypeSRV
Name / Service_minecraft._tcp.play
Priority0
Weight5
PortYour server port (e.g., 25565)
Targetplay.yourdomain.com
TTLAuto or 300

Different DNS providers have slightly different interfaces for SRV records. Here is how the fields map across common providers:

Cloudflare

  • Type: SRV
  • Name: _minecraft._tcp.play
  • Priority: 0
  • Weight: 5
  • Port: 25565 (your actual port)
  • Target: play.yourdomain.com

Namecheap

  • Type: SRV
  • Service: _minecraft
  • Protocol: _tcp
  • Name: play
  • Priority: 0
  • Weight: 5
  • Port: 25565 (your actual port)
  • Target: play.yourdomain.com

GoDaddy

  • Type: SRV
  • Name: _minecraft._tcp.play
  • Priority: 0
  • Weight: 5
  • Port: 25565 (your actual port)
  • Target: play.yourdomain.com

Step 4: Wait for DNS Propagation

DNS changes can take anywhere from a few minutes to 48 hours to propagate worldwide, though most changes take effect within 5-30 minutes. You can check propagation status using tools like dnschecker.org.

Step 5: Test the Connection

  1. Open Minecraft Java Edition.
  2. Go to Multiplayer.
  3. Click Add Server.
  4. Enter play.yourdomain.com as the server address (no port needed).
  5. Click Done and try to connect.

If the SRV record is set up correctly, Minecraft will automatically resolve the address to the correct IP and port.

Using the Root Domain

If you want players to connect using yourdomain.com (without a subdomain like play), adjust the records:

A/CNAME Record:

  • Name: @ (or blank, depending on your provider)
  • Value: The server hostname or IP

SRV Record:

  • Name/Service: _minecraft._tcp (without a subdomain suffix)
  • Target: yourdomain.com

Cloudflare Proxy Warning

If you use Cloudflare, make sure the proxy (orange cloud) is disabled for the CNAME or A record pointing to your Minecraft server. Minecraft uses TCP connections that Cloudflare’s HTTP proxy cannot handle. The DNS record must be set to DNS only (gray cloud).

Troubleshooting

Players cannot connect using the custom domain

  • Verify DNS propagation using dnschecker.org.
  • Double-check that the SRV record port matches your actual server port.
  • Ensure the CNAME or A record is correctly pointing to your server.
  • If using Cloudflare, make sure the proxy is disabled (gray cloud).

Connection works with IP but not with domain

  • The SRV record may not have propagated yet. Wait up to 30 minutes.
  • Some DNS providers require a trailing dot on the target (e.g., play.yourdomain.com.). Try adding it if your connection is not working.

Bedrock players cannot use the custom domain

SRV records are not supported by Bedrock Edition. Bedrock players must use the direct IP address and port.

Need Help?

If you need assistance setting up your custom domain, join our Discord and our team will walk you through it.