Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

What an SRV record does

A domain name is translated into an IP address by an A record. But an A record holds no port: if your server does not listen on Minecraft's default port, 25565, players still have to type example.com:25570.

The SRV record fills that gap. When a Java Edition player types a name without a port, the game first looks for a record named _minecraft._tcp. followed by that name. If it finds one, it reads the port and the target, that is, the name of the machine to reach. Otherwise, it falls back to the A record of the typed name, with port 25565. The game has read SRV records since Java Edition 1.3.1.

  • Server on port 25565: an A record is enough, no SRV needed.
  • Server on another port, or several servers on the same IP address: you need an A record and one SRV per address you give to players.
  • Bedrock Edition: according to the Minecraft wiki, the Bedrock server does not support SRV records. Bedrock players can type a domain name that points to the server, but they must still enter the port (19132 by default) in the field provided. The guide Java and Bedrock crossplay explains how to welcome both editions.

Your server's port is set by the server-port line of the server.properties file: see the guide server.properties.

02

Step 1: the A record

Start by giving the machine a name. In your domain's zone editor, add an A record:

  • Name (or host): a subdomain, for example mc, which gives mc.example.com;
  • Value: the server's public IPv4 address, for example 203.0.113.10;
  • TTL: how long resolvers keep the answer in memory. 3600 seconds is fine; use less (300) if you plan to change the address soon.

What about a CNAME? A CNAME is an alias: it points one name to another name. It can be used for the address players type when the server is on port 25565. However, the SRV standard (RFC 2782) requires the target of an SRV record to be a name that carries its address directly, not an alias. So always point the SRV to a name that has an A record. Also note that a CNAME cannot be placed on the bare domain (example.com) or next to other records with the same name.

03

Step 2: the SRV record

Then add the SRV record. It has five pieces of information:

  • Name: _minecraft._tcp so players type example.com, or _minecraft._tcp.play so they type play.example.com. Both underscores are required, and the protocol really is tcp.
  • Priority: the game tries the target with the lowest number first. With a single server, use 0 or 10, it makes no difference.
  • Weight: splits players between several targets of the same priority; a higher weight gets more players. With a single target, use 5 for example.
  • Port: the Minecraft server's actual port.
  • Target: the name created in step 1, mc.example.com. Never an IP address.

In a zone file, the two records are written like this:

mc.example.com.               3600 IN A   203.0.113.10
_minecraft._tcp.example.com.  3600 IN SRV 0 5 25570 mc.example.com.

Online editors often show the priority in a separate field, and the value in the form "weight port target" (5 25570 mc.example.com): this is the case of the zone editor in the CloudFive customer area.

Several servers on one IP address. Create one SRV per name, each with its own port: _minecraft._tcp.survival to port 25565 and _minecraft._tcp.creative to port 25566, both with the target mc.example.com. Players type survival.example.com or creative.example.com. The guide hosting several game servers details how to share ports.

04

Check it and wait for propagation

A new record usually answers within a few minutes. A change can take longer: resolvers keep the old answer until its TTL runs out. Check from a terminal before testing in game:

dig +short A mc.example.com
dig +short SRV _minecraft._tcp.example.com

The first command should print the IP address, the second a line like 0 5 25570 mc.example.com.. On Windows, nslookup -type=SRV _minecraft._tcp.example.com gives the same information.

  • If dig answers correctly but the game does not, your computer may still hold an old answer: close the game completely, and on Windows, clear the cache with ipconfig /flushdns.
  • If nothing answers several hours after creation, check that the domain really uses the name servers of the zone you edited.

In game, open Multiplayer, then Add Server, and type only example.com. If the address works for you, try it from another connection too, for example with a friend.

05

Common errors

  • An IP address as the SRV target: the target must be a domain name that has its own A record. An IP in that place is not valid.
  • The trailing dot: in a zone file, a name written without a trailing dot is completed with the zone's name. mc.example.com then becomes mc.example.com.example.com. Write mc.example.com. with the dot. Online editors each handle this dot their own way: check the result with dig.
  • The domain name repeated: in an editor that adds the domain itself, typing _minecraft._tcp.example.com in the name field creates _minecraft._tcp.example.com.example.com. Type only _minecraft._tcp.
  • A typo in the name: _minecraft._udp, a missing underscore, minecraft instead of _minecraft. The game only looks for _minecraft._tcp.
  • A DNS service's proxy: some DNS services offer to route traffic through their own servers (Cloudflare's "orange cloud", for example). That proxy relays web traffic, not game traffic. Set the server's A record to "DNS only".
  • A wrong port: the SRV port must be the server's port, and that port must be open. The guide game server ports helps you check it.

A domain name does not hide the IP address: anyone can find it with dig. For protection against attacks, see protecting a game server against DDoS.

06

On CloudFive

On a Minecraft hosting plan, from €8 a month, your server's IP address and port are shown in the customer area manager.cloudfive.fr: these are the values to put in the A record and the SRV. Paper, Purpur, Fabric, Forge, NeoForge and Modrinth modpacks install in one click, and Anti-DDoS Premium is included, with a profile specific to the game.

If your domain is with us, its name servers (ns1 and ns2.cloudfive.fr) are free, and the zone editor in the customer area accepts A, CNAME and SRV records. The SRV record is not created for you: add it by following the steps above. Starting the server for the first time is explained in the guide creating a Minecraft server, and support answers in French 7 days a week if the address does not work.

07

Frequently asked questions

How do I play Minecraft without typing the server port?

Create an A record that points a name (for example mc.example.com) to the server's IP address, then a _minecraft._tcp SRV record with the server's port and that name as the target. Java Edition players then just type example.com.

Do I need an SRV record if the server is on port 25565?

No. Port 25565 is the one the game uses by default: an A record pointing to the server's IP address is enough. The SRV is needed when the server uses another port, or for several servers on the same IP address.

Do SRV records work with Minecraft Bedrock?

No. According to the Minecraft wiki, the Bedrock server does not support SRV records. Bedrock players can type a domain name, but they must still enter the port, 19132 by default.

Why is my Minecraft SRV record not working?

The usual causes are an IP address as the target instead of a name, a misspelled name (it must start with _minecraft._tcp), the domain repeated in the name field, a missing trailing dot in a zone file, or a DNS proxy enabled on the A record. Check with dig SRV _minecraft._tcp.example.com.

How long does an SRV record take to work?

A new record usually answers within a few minutes. A change can take until the TTL of the old answer runs out, often one hour. Close the game completely before testing again.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay