Custom Domain
How to use a custom domain with SRV records for your Witchly.host Minecraft server.
Minecraft (15 articles)
On This Page
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
- Log in to Dashboard.
- Select your Minecraft server.
- Note the Server Address and Port from the overview page. For example:
- Address:
game1.witchly.host - Port:
25565
- Address:
Step 2: Create an A Record or CNAME Record
First, point your subdomain to the Witchly server:
Option A: Using a CNAME record (recommended)
| Type | Name | Value | TTL |
|---|---|---|---|
| CNAME | play | game1.witchly.host | Auto/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:
| Type | Name | Value | TTL |
|---|---|---|---|
| A | play | (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.
| Field | Value |
|---|---|
| Type | SRV |
| Name / Service | _minecraft._tcp.play |
| Priority | 0 |
| Weight | 5 |
| Port | Your server port (e.g., 25565) |
| Target | play.yourdomain.com |
| TTL | Auto 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
- Open Minecraft Java Edition.
- Go to Multiplayer.
- Click Add Server.
- Enter
play.yourdomain.comas the server address (no port needed). - 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.