How to point a domain at a Minecraft server with an A record
To point a domain at a Minecraft server, add an A record in your domain's DNS settings with 3 values:
- Name or host:
playfor play.example.com, or@or an empty field for example.com itself. - Value or answer: the server's IPv4 address. At home that is your external IP, after port forwarding.
- TTL: leave the default, or 600 seconds.
Java players can then type play.example.com, as long as the server runs on the default port 25565. To check the record, run nslookup -q=a play.example.com on Windows or dig play.example.com A on Linux and macOS, and look for your server's IP in the answer.
How to set up an SRV record for a Minecraft server
An SRV record lets Java players reach a Minecraft server on a port other than 25565 without typing the port, and Java Edition has read SRV records since version 1.3.1. An SRV record points at a name, not at an IP, so it takes 3 steps:
- Make an A record for the machine, such as node.example.com pointing at the server's IP.
- Add the SRV record: service
_minecraft, protocol_tcpand nameplay, which together make_minecraft._tcp.play.example.com. Set the port to the server's port, the target to node.example.com, and priority 0 with weight 5 for a single server. - Check it with
nslookup -q=srv _minecraft._tcp.play.example.comordig _minecraft._tcp.play.example.com SRV, which should show your port and target.
Players now type play.example.com with no port. The SRV record only helps Java players: Bedrock players type the name and the port themselves.
Minecraft server domain on Cloudflare
On Cloudflare, a Minecraft server domain only works when its A record is set to DNS only, the grey cloud, because a proxied record with the orange cloud routes HTTP and HTTPS traffic through Cloudflare and not a Minecraft connection. SRV records are always DNS only there, so the A record is the one to check. Keep in mind that a DNS only record shows the server's real IP address to anyone who looks it up, so a domain on its own does not hide the IP of a server at home.
What Bedrock players type with a domain
Bedrock players type a Minecraft server domain in the Server Address field and the port in its own Port field, because Bedrock Edition cannot connect without a port. Bedrock uses 19132, the default port of a Bedrock server, unless the player enters another number, so a server on that port only needs the name. On a crossplay server at a host, the Bedrock port can be a different number for each server: Lodehost shows it in the panel, and Astroworld Hosting uses 19132 or the number it gives you.
Free domain for a Minecraft server
You can get a free domain for a Minecraft server in 2 ways, without registering one:
- The address your host gives you. Astroworld Hosting and Lodehost give every server a free address with a name of 3 to 24 characters that you pick, which Java players type without a port, and both let you add 3 more names from the panel. Cheapest Minecraft Hosting lets you pick your name on its own domain.
- A dynamic DNS subdomain. A service such as No-IP gives a server at home a free name under its own domain, which follows your external IP when it changes.
A domain of your own is worth paying for once players should find the server by its name on server lists, in videos and on a website.
Can you use your own domain with a hosted Minecraft server?
You can use your own domain with a hosted Minecraft server, but ask the host first, because some hosts send each player to the right server by the name they typed. That is how Astroworld Hosting and Lodehost route Java players without a port, and it means their router has to know your domain. Astroworld Hosting says a name of yours pointed at your address works, but that it does not manage the record and asks you to check with it first; Lodehost asks you to send it the domain so it can tell you what is possible. At a host that gives you a plain IP and port, the A record and SRV record above work as they do at home.
One domain for the server and the website
One domain can carry both: example.com for the server website and play.example.com for the Minecraft server, because each name has records of its own. The free website at Astroworld Hosting and Lodehost runs on a free web address, and your own domain for the site comes with the paid tier, €11.99 a month at Astroworld Hosting. See the free Minecraft server website for what the free site includes.
Why is my Minecraft server domain not working?
When a Minecraft server domain does not work, 1 of 6 things is usually wrong:
- The record is too new. Your computer or provider still has the old answer; wait, or test with nslookup or dig.
- The Cloudflare proxy is on. Set the A record to DNS only.
- The SRV target is an IP address. It has to be a name with an A record of its own.
- The SRV name is wrong. It has to start with
_minecraft._tcp, and some DNS panels add the domain again at the end. - A Bedrock player left out the port, or typed the Java port.
- The host does not know your domain, where it routes players by name.

