Minecraft Java looks up an SRV record before connecting. It tells the client which host and port to use, so players type only the domain.
The record
At your DNS provider add a record of type SRV:
| Field | Value |
|---|---|
| Name / Service | _minecraft._tcp.play (some panels split this into service _minecraft, protocol _tcp, name play) |
| Priority | 0 |
| Weight | 5 |
| Port | your port, e.g. 4123 |
| Target | your server address like survival.penguhost.com, or node1.penguhost.com (or play.yourdomain.com if you created that CNAME/A first) |
Save. After DNS propagates, play.yourdomain.com in the Minecraft server list connects to node1.penguhost.com:4123.
Check it
On your PC: nslookup -type=SRV _minecraft._tcp.play.yourdomain.com should show the port and target. Kowalski can check it too: "does the SRV record for play.example.com work?"
Where it does not work
SRV is a Java Edition feature. Bedrock, Geyser (Bedrock side), Rust and Steam games ignore it, so those players keep the port.