Connecting a Custom Domain

6 min read Updated Feb 15, 2026

This guide explains how to connect your own domain to your Minecraft server, allowing players to join using an address like play.yourdomain.com instead of an IP address and port. Say goodbye to purchasing a dedicated IP or having players type an ugly port number at the end of your domain.

What is an SRV Record?

An SRV (Service) record is a type of DNS record that tells Minecraft where your server is located. It allows you to:

  • Use a clean domain name without showing the port number
  • Point a subdomain to your server's IP and port
  • Let players connect using play.yourdomain.com instead of 123.456.78.90:25566

Without an SRV record, Minecraft only checks the default port (25565). If your server uses a different port, players would need to type the full IP and port to connect. An SRV record solves this by telling Minecraft which port to use.

Prerequisites

Before setting up your domain, you will need:

  • A domain you own (e.g., yourdomain.com)
  • Access to your DNS settings (through your domain registrar or DNS provider)
  • Your server's IP address and port (found in the Game Panel under your server's connection details)

Finding Your Server Details

  1. Log in to the Game Panel
  2. Select your server
  3. Your server address will be shown on the console page (e.g., 123.456.78.90:25566 or your-server.obby.host)
  4. Note down both the hostname and the port number

DNS Record Setup

You will need to create two DNS records:

  1. A Record - Points your subdomain to the server IP
  2. SRV Record - Tells Minecraft which port to use

Record Values

For this guide, we will use the following example values. Replace these with your own details:

Value Example Your Value
Subdomain play Your chosen subdomain
Server Address your-server.obby.host From Game Panel
Server Port 25566 From Game Panel
Your Domain yourdomain.com Your domain

Setup by Registrar

Cloudflare

A Record:

  1. Log in to your Cloudflare Dashboard
  2. Select your domain
  3. Go to DNS > Records
  4. Click Add record
  5. Set the following:
    • Type: A
    • Name: play (or your chosen subdomain)
    • IPv4 address: Your server's IP address
    • Proxy status: DNS only (grey cloud - important!)
    • TTL: Auto
  6. Click Save

SRV Record:

  1. Click Add record
  2. Set the following:
    • Type: SRV
    • Name: _minecraft._tcp.play (replace play with your subdomain)
    • Service: _minecraft
    • Protocol: _tcp
    • TTL: Auto
    • Priority: 0
    • Weight: 5
    • Port: Your server port (e.g., 25566)
    • Target: Your server address (e.g., play.yourdomain.com)
  3. Click Save

Important: The proxy status must be set to "DNS only" (grey cloud). Cloudflare's proxy does not support Minecraft traffic.


Namecheap

A Record:

  1. Log in to your Namecheap Account
  2. Go to Domain List and click Manage next to your domain
  3. Go to the Advanced DNS tab
  4. Click Add New Record
  5. Set the following:
    • Type: A Record
    • Host: play (or your chosen subdomain)
    • Value: Your server's IP address
    • TTL: Automatic
  6. Click the tick to save

SRV Record:

  1. Click Add New Record
  2. Set the following:
    • Type: SRV Record
    • Service: _minecraft
    • Protocol: _tcp
    • Host: play (your subdomain)
    • Value: Your server address (e.g., play.yourdomain.com)
    • Priority: 0
    • Weight: 5
    • Port: Your server port (e.g., 25566)
    • TTL: Automatic
  3. Click the tick to save

GoDaddy

A Record:

  1. Log in to your GoDaddy Account
  2. Go to My Products and click DNS next to your domain
  3. Click Add in the Records section
  4. Set the following:
    • Type: A
    • Name: play (or your chosen subdomain)
    • Value: Your server's IP address
    • TTL: 1 Hour
  5. Click Save

SRV Record:

  1. Click Add in the Records section
  2. Set the following:
    • Type: SRV
    • Name: _minecraft._tcp.play (replace play with your subdomain)
    • Priority: 0
    • Weight: 5
    • Port: Your server port (e.g., 25566)
    • Target: Your server address (e.g., play.yourdomain.com)
    • TTL: 1 Hour
  3. Click Save

Squarespace

A Record:

  1. Log in to your Squarespace Domains
  2. Select your domain
  3. Go to DNS > DNS Settings
  4. Click Add Record
  5. Set the following:
    • Type: A
    • Host: play (or your chosen subdomain)
    • Data: Your server's IP address
    • TTL: Automatic
  6. Click Save

SRV Record:

  1. Click Add Record
  2. Set the following:
    • Type: SRV
    • Host: _minecraft._tcp.play (replace play with your subdomain)
    • Priority: 0
    • Weight: 5
    • Port: Your server port (e.g., 25566)
    • Data: Your server address (e.g., play.yourdomain.com)
  3. Click Save

Understanding the SRV Record Format

The full SRV record name follows this format:

_minecraft._tcp.play.yourdomain.com
Part Meaning
_minecraft The service name (tells DNS this is for Minecraft)
_tcp The protocol (Minecraft uses TCP)
play Your chosen subdomain
yourdomain.com Your domain

TTL and Propagation Time

TTL (Time To Live) determines how long DNS servers cache your records before checking for updates.

  • Lower TTL (300-3600 seconds) = faster updates, but more DNS queries
  • Higher TTL (86400 seconds) = slower updates, but fewer DNS queries

Propagation time is how long it takes for DNS changes to spread across the internet. This typically takes:

  • Minimum: A few minutes
  • Average: 1-4 hours
  • Maximum: Up to 48 hours (rare)

If your domain does not work immediately, wait a few hours and try again.

Testing Your Domain

Once your DNS records are set up and propagated, test your domain:

In Minecraft:

  1. Open Minecraft and go to Multiplayer
  2. Click Add Server or Direct Connect
  3. Enter your domain (e.g., play.yourdomain.com)
  4. You should see your server appear with the correct player count and MOTD

Online Tools:

  • mcsrvstat.us - Enter your domain to check if it resolves correctly
  • DNSChecker.org - Check if your DNS records have propagated globally

Troubleshooting

Domain Not Resolving

If your domain is not working:

  1. Check propagation - Use DNSChecker.org to see if your records have propagated
  2. Verify your records - Double-check that all values are entered correctly
  3. Wait longer - DNS propagation can take up to 48 hours in some cases
  4. Check for typos - Ensure the subdomain and service names are spelled correctly

Wrong Port or Connection Refused

If you can see the server but cannot connect:

  1. Verify the port - Make sure the port in your SRV record matches your server's port
  2. Check the target - Ensure the SRV target points to the correct server address
  3. Server online - Confirm your server is running in the Game Panel

Cloudflare Proxy Issues

If you are using Cloudflare and the domain does not work:

  1. Make sure the Proxy status is set to DNS only (grey cloud)
  2. Cloudflare's orange cloud proxy does not support Minecraft traffic
  3. Edit your A record and click the orange cloud to turn it grey

SRV Record Not Being Used

If Minecraft ignores your SRV record and asks for a port:

  1. Verify the SRV record name starts with _minecraft._tcp.
  2. Check that the full record name matches your subdomain exactly
  3. Try clearing your local DNS cache:
    • Windows: Run ipconfig /flushdns in Command Prompt
    • macOS: Run sudo dscacheutil -flushcache in Terminal
    • Linux: Run sudo systemd-resolve --flush-caches in Terminal

Need Help?

If you are still having trouble connecting your domain:

Was this article helpful?

Related Articles