How to Set Up SRV Records for Your Minecraft Server

Learn how to use a custom domain name to connect to your Minecraft server with SRV records.

SRV (Service) records let players connect to your Minecraft server using a clean custom domain like play.example.com instead of remembering an IP address and port number. This guide walks through setting up both the required A record and SRV record using Cloudflare, but the process is similar on any DNS provider.

Step 1: Create an A Record

First, point a subdomain to your server's IP address:

Log in to your DNS provider

Log in to your DNS provider (e.g., Cloudflare, GoDaddy, Namecheap).

Open DNS management

Go to the DNS management section.

Add an A record

Add a new A record with these settings:

  • Name: The subdomain you want to use (e.g., play)
  • IPv4 Address: Your server's IP address (the numbers before the colon in your server IP)

📝 Note: Your server's IP address can be found on the XGamingServer panel sidebar when you select your server. See our connection guide for details.

Step 2: Create an SRV Record

Next, create the SRV record that tells Minecraft clients where to connect:

Add an SRV record

In your DNS management, add a new SRV record with these settings:

  • Name: _minecraft._tcp
  • Priority: 1
  • Weight: 1
  • Port: Your Minecraft server's port number (the number after the colon in your server IP)
  • Target: The hostname from your A record (e.g., play.domain.tld)
  • TTL: Auto

Save the record

Save the record.

The complete SRV record looks like this:

_minecraft._tcp.domain.tld SRV 1 1 25565 play.domain.tld

Step 3: Wait for DNS Propagation

DNS changes can take anywhere from a few minutes to several hours to propagate, depending on your provider. After propagation, players can connect using just your domain (e.g., play.domain.tld) without needing to enter a port number.

💡 Tip: SRV records only work with Minecraft Java Edition. Bedrock Edition does not support SRV records — players will need to use the IP address and port directly.

If you get stuck at any time, you can join our Discord.

How is this guide?

40% Off — Limited TimeGet your Minecraft server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page