Minecraft Server Without a Port Number: How to Set Up an SRV Record

Remove :25565 from your Minecraft server with an SRV record. Complete guide to setup on Cloudflare, Namecheap and other DNS providers.


With an SRV record, players can connect to your Minecraft server using your domain name - without a port number. Instead of my-mc-server.com:25566, they just type my-mc-server.com, and the SRV record forwards them to the correct port.

Three reasons to do it:

  • Nicer address. play.my-mc-server.com looks better than play.my-mc-server.com:25567 and is easier to remember.
  • No port confusion. No more "what was the port again?" in your Discord.
  • Flexibility. You can change host, IP, or port later without your players having to change anything. You just update your SRV record.

Java Edition only. SRV records don't work with Bedrock (Windows 10/11, consoles, mobile, Switch). Bedrock players always have to type the port. Running a server with both Java and Bedrock? Mention it in your instructions.

There are two ways to do this:

  1. The easy way - if your domain is linked to your Potionhost server
  2. The manual way - if your domain is at Cloudflare, Namecheap, GoDaddy, or another DNS provider

What is an SRV record?

An SRV record points a service (here _minecraft._tcp) to a hostname and a port. Four values matter:

  • Priority - lower number wins. Use 0 unless you have multiple servers.
  • Weight - used for load balancing between servers with the same priority. 5 is a safe default.
  • Port - your server port (the default is 25565, but often something else like 25566 or 25567).
  • Target - the hostname that points to your server (e.g. mc.my-mc-server.com).

The result: play.my-mc-server.com automatically forwards to mc.my-mc-server.com:25567.


Part 1 - The easy way (domain linked at Potionhost)

Is your domain already linked to your Potionhost server? Then it's done in 10 seconds.

Step 1 - Find your server

In the client area: click Servers in the sidebar and open your Minecraft server.

Step 2 - Open the Domain tab

Click the Domain tab.

Step 3 - Click "Add SRV record"

Click the blue plus next to Add SRV record.

Not seeing what's in the screenshot? Link your domain to your server.

  • Already have a domain? Pick it from the list.
  • Don't have one? Choose a free Potionhost subdomain - pick any available name (e.g. myserver.skyblock.dk) from our list of domains. The A record and SRV record are created automatically, so you can skip the rest of the guide and your players can connect right away.
  • Want your own domain? You can buy one at potionhost.com/domains.

Note: each server can have one free subdomain at a time.

Step 4 - Done

That's it - your players can now connect without a port number.

The DNS setup is placed on the main domain (my-mc-server.com, not play.my-mc-server.com). Potionhost creates two records automatically:

  • An A record like minecraft.my-mc-server.com that points to your server's IP
  • An SRV record on the main domain that points to minecraft.my-mc-server.com with the correct port

Would you rather have a subdomain like play.my-mc-server.com? Click Manage DNS in the top right and add records manually - see Part 2 for the values.


Part 2 - The manual way (external DNS provider)

If your domain lives somewhere else, you'll need to add the SRV record yourself. The values are the same everywhere - only the interface changes.

The values you need

Get these from your Potionhost server page:

  • Target hostname - typically mc.potionhost.net, or an A record you've made yourself (e.g. mc.my-mc-server.com pointing to the server IP).
  • Port - shown on your server's overview page (e.g. 25567).

Use these values:

Field Value
Service _minecraft
Protocol _tcp
Name / Host play (or whatever subdomain you want)
Priority 0
Weight 5
Port your server port
Target your target hostname
TTL 3600 (or "Auto")

Tip: Does your provider only have a single "Name" field? Use the format _minecraft._tcp.play (swap play for your subdomain).

Here's how it looks at the most common providers:


Cloudflare

  1. Log in at Cloudflare and select your domain.

  2. Go to DNS → Records and click Add record.

  3. Set Type to SRV.

  4. Fill in:

    • Name - _minecraft._tcp.play (Cloudflare appends the domain automatically)
    • Priority - 0
    • Weight - 5
    • TTL - Auto
    • Port - your Minecraft port
    • Target - your target hostname (without trailing period)

  1. Click Save. The changes propagate within a few minutes.

Namecheap

  1. Log in to Namecheap, go to Domain List, and click Manage next to your domain.

  2. Open the Advanced DNS tab.

  3. Under Host Records: click Add New Record and select SRV Record.

  4. Fill in:

    • Service - _minecraft
    • Protocol - _tcp
    • Priority - 0
    • Weight - 5
    • Port - your Minecraft port
    • Target - your target hostname (without trailing period)
    • TTL - Automatic

  1. Click the green checkmark to save.

Other providers (general)

Most other providers (Hostinger, one.com, Gandi, Scaleway, DigitalOcean, etc.) handle it in one of two ways:

Method A - separate fields: Fill in Service, Protocol, Name, Priority, Weight, Port, and Target as shown in the table above.

Method B - single combined target field: Set Host to _minecraft._tcp.yoursubdomain and Target/Data to 0 5 <port> <hostname> (priority, weight, port, hostname, separated by spaces).

If you can't find SRV as an option at all, your provider probably doesn't support it. Switch to Cloudflare (free), or have your players type the port themselves.


Check that it works

DNS changes take a few minutes. Once they've propagated, you can check your records two ways.

Option 1 - Command line

On Linux or macOS:

dig SRV _minecraft._tcp.play.my-mc-server.com +short

On Windows, open Command Prompt:

nslookup -type=SRV _minecraft._tcp.play.my-mc-server.com

Swap play.my-mc-server.com for your subdomain. The output should show priority, weight, port, and target hostname.

Option 2 - Connect from Minecraft

Open Minecraft → Multiplayer → Add Server and type just your subdomain (e.g. play.my-mc-server.com) without a port.


Troubleshooting

  • "Can't resolve hostname" - The target hostname has to be resolvable to an IP itself. Is your target mc.my-mc-server.com? Then you also need an A record for mc that points to the server IP.
  • Still asks for a port - Check that the type is SRV, not A or CNAME. The name must be exactly _minecraft._tcp.yoursubdomain - underscores matter. And remember: Bedrock clients always need a port, even with an SRV record.
  • Takes forever to update - DNS caches up to the TTL you've set. Lower the TTL before making changes, or wait up to an hour.
  • Works for some, not others - Their ISP's DNS is still caching the old record. It resolves itself within an hour.

Guide Information

Published
April 18, 2026
Last Updated
May 26, 2026
Views
644