Direct answer

An A or AAAA record points a hostname to an IP; an SRV record can specify a non-default Java Edition port.

Recommended procedure

  1. Find the actual public listener address and TCP port. Add an A record for IPv4 and AAAA only when IPv6 is reachable and configured.
  2. For a non-default Java port, configure an _minecraft._tcp SRV record using the DNS provider’s required name/target/priority/weight fields; the target must resolve appropriately.
  3. Test DNS resolution separately from external port reachability. A domain does not bypass CGNAT, a provider firewall or missing router forwarding.

Why this matters

Networking problems are easiest to solve when you separate DNS, routing/NAT, firewalls, and the Minecraft process instead of treating them as one setting.

Important limitation: Bedrock discovery and proxy routing may use different protocols/ports. Do not assume the Java TCP SRV record covers a Geyser UDP listener.

How to verify the result

  • From an external network, resolve the hostname, then connect to the server through the hostname; compare direct IP connection to isolate DNS problems.

Version and compatibility notes

  • When a setting, command, or file name differs from this guide, stop and check the documentation for your exact Minecraft/server-software version instead of forcing an old example.

Official references

These sources were checked for the current MSH revision. Version-sensitive details should always be confirmed against the project documentation for the release you run.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000