How to create SRV record for Minecraft Java?

SRV record allows Java players to connect to private port without typing port. In the example, the player uses play.example.net and the server uses node.example.net:25566.

Step by step

  1. In the DNS panel, first create an A or, if necessary, AAAA record for node.example.net, which goes to the server's public address. Verify that the target is resolved directly.

  2. Add SRV record to name _minecraft._tcp.play.example.net. Example values ​​are priority 0, weight 0, port 25566, and destination node.example.net.. If the panel adds the domain name automatically, do not type the full name twice.

  3. Read the result with Resolve-DnsName _minecraft._tcp.play.example.net -Type SRV in PowerShell. The value on the DNS provider's panel must be the same as the value visible from the outside.

  4. Just enter play.example.net in the Java server list. If the connection is established without entering a separate port, recording works as intended.

Keep in mind

SRV registration does not open the modem or firewall port. Give address and UDP port separately to Bedrock players.

Source and tools