King's Domain Logo

King'sDomain INFO

How to Create an SRV Record for Minecraft Servers Without Default Ports

10 min read

There is nothing that ruins the professional feel of a Minecraft server quite like having to type a port number. You want your players to join via play.yourdomain.com, but because you are on a budget shared hosting plan, you're stuck asking them to type play.yourdomain.com:25587.

It’s ugly, hard to remember, and unnecessary. The solution? DNS SRV Records.

In this comprehensive guide, we will walk you through exactly what an SRV record is, why it works, and provide step-by-step instructions for setting it up on popular registrars like Cloudflare and Namecheap. Whether you are hosting with King's Domain or elsewhere, this guide will ensure your server address looks clean and professional.

The Problem: Shared Hosting and Ports

To understand why you need an SRV record, you first need to understand how Minecraft connects to servers.

By default, when a player types an IP or domain into their Minecraft client (like mc.hypixel.net), the game assumes the server is listening on port 25565. If your server is actually running on 25565, you don't need an SRV record; a simple "A Record" pointing to your IP address is sufficient.

However, with shared hosting (public hosting), providers host hundreds of servers on a single machine (node). Since only one server can use port 25565 on that IP, every other customer gets assigned a random port, like 25672 or 40123.

If you don't set up an SRV record, players must type that port manually. An SRV record acts as a signpost that tells the Minecraft client: "Hey, I know you're looking for a Minecraft server at this domain. Don't use the default port; go to port 25672 instead."

What is an SRV Record?

SRV stands for Service Record. Unlike standard A Records (which map a name to an IP) or CNAME records (which map a name to another name), SRV records are designed to specify the location of a specific service (like Minecraft, VoIP, or XMPP) by defining the hostname and the port number.

An SRV record consists of several critical components:

  • Service: The name of the service. For us, this is always _minecraft.
  • Protocol: The transport protocol. Minecraft uses TCP, so this is _tcp.
  • Priority & Weight: These are used for load balancing. For a single Minecraft server, we usually set these to 0 or 5.
  • Port: The actual number port your server is running on (e.g., 25672).
  • Target: The hostname where the server is actually located.
Critical Note for Bedrock Edition: SRV records are primarily a feature of the Java Edition protocol. Minecraft Bedrock Edition (PE/Console/Windows 10) does not natively support SRV records for port redirection in the same way. If you run a Bedrock server on a non-default port (19132), players usually must type the port. However, King's Domain offers dedicated IPs on higher-tier plans which solves this issue for Bedrock users completely.

Step 0: The Prerequisite (The "Target")

This is the most common mistake people make. An SRV record cannot point to an IP address (like 192.168.1.1). It must point to a domain name (hostname).

Before you create your SRV record, you need a valid hostname that points to your server's IP. You have two options:

  1. Use the Host's Subdomain: If your hosting provider gave you an address like node14.kingsdomain.uk, you can use that directly as your Target. You do not need to create an A record.
  2. Create Your Own A Record: If you only have the raw IP address (e.g., 51.222.10.5), you must first create a subdomain (like server-ip.yourdomain.com) that points to that IP.

For the guides below, we will assume you want players to join using play.yourdomain.com and you need to mask a port.

Method 1: Setting up SRV Records in Cloudflare

Cloudflare is the gold standard for DNS management because it propagates changes almost instantly. We highly recommend using Cloudflare for your domain DNS.

1. Create the A Record (The Anchor)

If you don't already have a subdomain pointing to the numeric IP, create one now.

  • Type: A
  • Name: server-ip (or something internal, players won't type this)
  • IPv4 Address: Your server's numeric IP (without the port).
  • Proxy Status: DNS Only (Grey Cloud). Do not proxy this! Minecraft cannot connect through Cloudflare's orange-cloud HTTP proxy.

2. Create the SRV Record

Now, create the record players will actually join.

  • Type: SRV
  • Name: play (This creates play.yourdomain.com)
  • Service: _minecraft
  • Protocol: TCP
  • TTL: Auto
  • Priority: 0
  • Weight: 5
  • Port: 25587 (Replace with YOUR specific server port)
  • Target: server-ip.yourdomain.com (The A record you created in Step 1, or your host's node address)

Click Save. In Cloudflare, this should work within minutes.

Method 2: Setting up SRV Records in Namecheap

Namecheap's interface is slightly different but follows the same logic.

1. Navigate to Advanced DNS

Log in to Namecheap, go to your Domain List, click Manage next to your domain, and select the Advanced DNS tab.

2. Add the A Record

Click Add New Record.

  • Type: A Record
  • Host: server-ip
  • Value: Your numeric IP address.
  • TTL: Automatic

3. Add the SRV Record

Click Add New Record again and scroll down to SRV Record.

  • Service: _minecraft
  • Protocol: _tcp
  • Priority: 0
  • Weight: 5
  • Port: 25587 (Your server port)
  • Target: server-ip.yourdomain.com
  • TTL: Automatic

Crucial Namecheap Quirk: For the "Host" field in the SRV record line (often hidden or separate in some views), you usually leave it blank (for root domain) or type the subdomain prefix (like play). Namecheap combines Service+Protocol+Host into one line in some older interfaces, but their modern dashboard separates them clearly.

Method 3: cPanel (Generic Hosts)

If you use cPanel Zone Editor (common with general web hosting), the process is similar.

  1. Go to Zone Editor -> Manage.
  2. Add an A Record for server-ip.yourdomain.com pointing to the server IP.
  3. Select Add Record -> SRV.
  4. Name: _minecraft._tcp.play.yourdomain.com. (Note the trailing dot is often required in cPanel).
  5. Priority: 0
  6. Weight: 5
  7. Port: Your Port
  8. Target: server-ip.yourdomain.com

Troubleshooting: Why isn't it working?

You've followed the steps, but Minecraft still says "Can't resolve hostname". Here is how to fix it.

1. DNS Propagation Delay

DNS is not instant. While Cloudflare is fast, other registrars can take up to 48 hours to update global caches. Before panicking, wait a few hours. You can use tools like DNSChecker to see if your SRV record is visible globally.

2. The "Grey Cloud" Rule

If you are using Cloudflare, verify your A Record (the Target) is set to DNS Only (Grey Cloud). If it is set to Proxied (Orange Cloud), Cloudflare hides your real IP and serves web traffic, which blocks Minecraft connections entirely.

3. Validating with Command Line

You can check if your computer can see the record using the Command Prompt (Windows) or Terminal (Mac/Linux).

nslookup -type=SRV _minecraft._tcp.play.yourdomain.com

If this command returns your target hostname and port, the DNS is correct, and the issue might be a firewall on the server itself.

The King's Domain Advantage

Setting up SRV records is a rite of passage for server owners, but it can be tedious. At King's Domain, we believe in making high-performance hosting accessible and easy.

While we support full custom DNS configurations for all our clients, our Premium Plans often include Dedicated IPs. A Dedicated IP means you own the entire port range for that address. You can use the default port (25565), meaning no SRV records are required at all. You simply point an A Record to your IP, and you are done. It also enables native Bedrock compatibility without messy port numbers.

If you are tired of DNS headaches and connection issues, check out our hosting packages tailored for serious communities.

Conclusion

SRV records are a powerful tool in the arsenal of any Minecraft server administrator. They allow you to turn a budget shared hosting server into a professional-looking brand. By following the steps above, you've ensured that your players connect seamlessly, without ever needing to memorize a random string of numbers.

Remember: A Record points to the IP, SRV Record points to the Port. Keep that rule in mind, and you will never struggle with Minecraft DNS again.

Skip the DNS Hassle?

Upgrade to a King's Domain plan with a Dedicated IP for instant plug-and-play connectivity.

View Premium Plans