Custom Domain for Your Minecraft Server
Set up DNS SRV records and A records: Connect with your own domain instead of IP:port on your Minecraft server.
Why Use a Custom Domain
A custom domain makes your server address memorable and professional. Instead of giving players an IP address and port like 192.168.1.100:25565, they connect using play.yourdomain.com.
Benefits:
- Players remember a domain name easier than an IP address
- You can change server IPs without telling players a new address
- Looks professional on server lists and community pages
- Hides your server’s actual IP address
On Minecraft Server Hosting, you receive a dedicated IP address. This guide shows you how to point your own domain to it.
DNS Concepts
Two DNS record types are relevant for Minecraft servers:
| Record Type | Purpose | Example |
|---|---|---|
| A Record | Maps a domain to an IP address | play.example.com -> 203.0.113.50 |
| SRV Record | Maps a service to a specific host and port | _minecraft._tcp.example.com -> play.example.com:25565 |
When You Need Each
- Default port (25565): Only an A record is needed
- Non-default port: You need both an A record and an SRV record
- Dedicated IP from RespawnHost: Typically uses port 25565, so only an A record is required
A Record Setup
An A record points your domain or subdomain to your server’s IP address.
Steps
- Log in to your domain registrar’s DNS management panel
- Create a new A record with these values:
| Field | Value |
|---|---|
| Name/Host | play (creates play.yourdomain.com) |
| Type | A |
| Value/Address | Your server’s IP address |
| TTL | 3600 (1 hour) or Auto |
- Save the record
- Wait for DNS propagation (typically 5-30 minutes, up to 48 hours in rare cases)
After propagation, players can connect using play.yourdomain.com if your server runs on port 25565.
SRV Record Setup
SRV records tell Minecraft clients which host and port to use for connecting. This is necessary when your server runs on a non-default port or when you want the root domain to work (e.g., minecraft.yourdomain.com connecting to play.yourdomain.com:25565).
Steps
- In your DNS management panel, create a new SRV record:
| Field | Value |
|---|---|
| Service | _minecraft |
| Protocol | _tcp |
| Name/Host | yourdomain.com or subdomain like mc |
| Priority | 0 |
| Weight | 5 |
| Port | Your server port (e.g., 25565) |
| Target | play.yourdomain.com (must be an existing A record) |
| TTL | 3600 or Auto |
- Save the record
Full Example
For players connecting via mc.example.com to a server at 203.0.113.50:25565:
A Record:
play.example.com A 203.0.113.50
SRV Record:
_minecraft._tcp.mc.example.com SRV 0 5 25565 play.example.com
Players enter mc.example.com in Minecraft and the SRV record automatically resolves to play.example.com:25565.
SRV Record Fields Explained
- Priority: Lower values take precedence. Use 0 for a single server.
- Weight: Used for load balancing between multiple servers with the same priority. Use 5 for a single server.
- Port: The Minecraft server port.
- Target: The hostname (A record) that points to your server IP.
Cloudflare Considerations
Cloudflare is a popular DNS provider, but its proxy feature (the orange cloud) causes problems with Minecraft servers.
Why Orange Cloud Must Be Off
Cloudflare’s proxy only supports HTTP/HTTPS traffic. Minecraft uses the TCP protocol directly. Enabling the orange cloud (proxy mode) breaks Minecraft connections.
Correct Cloudflare Setup
- Go to your Cloudflare DNS settings
- Create the A record with the proxy status set to DNS only (grey cloud, not orange)
- Create the SRV record (SRV records cannot be proxied)
# Correct setup:
play.example.com A 203.0.113.50 [DNS only - grey cloud]
# Wrong setup:
play.example.com A 203.0.113.50 [Proxied - orange cloud] <-- BREAKS MINECRAFT
If you use Cloudflare for your website but want Minecraft on a subdomain, set only the Minecraft subdomain to DNS only. Your website can remain proxied.
Testing Your DNS Configuration
Using nslookup
Test A records:
nslookup play.example.com
Expected output:
Name: play.example.com
Address: 203.0.113.50
Test SRV records:
nslookup -type=SRV _minecraft._tcp.mc.example.com
Expected output:
_minecraft._tcp.mc.example.com SRV service location:
priority = 0
weight = 5
port = 25565
svr hostname = play.example.com
Using dig (Linux/macOS)
dig play.example.com A
dig _minecraft._tcp.mc.example.com SRV
In-Game Test
- Open Minecraft
- Go to Multiplayer -> Add Server
- Enter your domain (e.g.,
mc.example.com) - The server should appear with correct MOTD and player count
- If it shows “Can’t resolve hostname,” DNS has not propagated yet or is misconfigured
Common Issues
”Can’t resolve hostname”
- DNS has not propagated yet (wait up to 48 hours)
- A record is missing or pointing to the wrong IP
- Typo in the domain name
”Connection refused”
- A record resolves correctly but the server is offline
- The port in the SRV record does not match the actual server port
- Firewall blocking the port
”Connection timed out”
- Server is offline or unreachable
- SRV record target hostname does not exist (must be a valid A record, not a CNAME)
- Cloudflare proxy is enabled (orange cloud) — disable it
SRV Record Not Working
- Ensure the target field points to an existing A record, not an IP address directly
- Some DNS providers format SRV records differently; check their documentation
- Verify the full service string:
_minecraft._tcp.yourdomain.com
FAQ
Do I need an SRV record if my server uses port 25565?
Not necessarily. If your server runs on the default Minecraft port (25565), players can connect using just the A record hostname. The SRV record is needed when the port is non-default or when you want a clean address without specifying a port.
Can I use a subdomain like play.example.com?
Yes. Create an A record for the subdomain (play) pointing to your server IP. Players connect using play.example.com.
How long does DNS propagation take?
Most DNS changes propagate within 5-30 minutes. Some providers cache longer, so it can take up to 48 hours in rare cases. You can check propagation status using online tools like dnschecker.org.
Can I point multiple domains to the same server?
Yes. Create A records for each domain pointing to the same IP address. Players can connect using any of the configured domains.
Does Cloudflare DDoS protection work for Minecraft?
Cloudflare’s standard proxy does not protect Minecraft (TCP) traffic. Cloudflare Spectrum offers TCP protection but is an enterprise-level service. For DDoS protection on Minecraft, use a hosting provider that includes network-level protection.
Can I use a free domain?
Yes, as long as you have DNS control. Free domain services like Freenom (if available) or subdomain services work, though paid domains are more reliable and professional.
What if my server IP changes?
Update the A record to point to the new IP. DNS propagation takes a few minutes. With Minecraft Server Hosting, your dedicated IP stays consistent.
Can I use CNAME instead of A record?
For the A record that the SRV target points to, you must use an A record (IP address). Some DNS providers allow CNAME at the apex, but for Minecraft SRV records, the target should resolve to an A record for reliability.