How to Connect a Custom Domain to Your Minecraft Server
Using a custom domain (like play.mycoolserver.net
) instead of a long IP address makes it much easier for players to remember and connect to your Minecraft server. This guide will walk you through the process step-by-step.
Step 1: Get Your Server Information
Before you start, you need two key pieces of information from your server provider's control panel:
-
Your Server's Numerical IP: This is the series of numbers that identifies your server. You must use the numerical IP, not a hostname (like
g2.valuegamenode.com
).-
Example:
123.45.67.89
-
-
Your Server's Port: This is the number after the colon (
:
).-
Example:
25678
-
If your address has no port number, it's using the Minecraft default, which is
25565
.
-
You will also need access to your domain's DNS settings, which are managed on the website where you purchased your domain (e.g., GoDaddy, Namecheap, Cloudflare).
Step 2: Create the DNS Records
Log in to your domain registrar's website and navigate to the DNS management page. The records you need to create depend on your server's port.
Method A: For Servers on the Default Port (25565)
If your server's port is 25565
, you only need one A record. This record points your domain directly to your server's IP address.
-
Create a new DNS record with these settings:
-
Type:
A
-
Name/Host: The subdomain players will use. For
play.mycoolserver.net
, enterplay
. To use your main domain (mycoolserver.net
), enter@
. -
Value/Points to: Your server's numerical IP address (e.g.,
123.45.67.89
). -
TTL (Time To Live): Leave this on the default setting (usually "Automatic").
-
Example A Record:
Type |
Name |
Value (Points to) |
TTL |
---|---|---|---|
A |
play |
g2.valuegamenode.com |
Automatic |
With this, players can now connect using play.mycoolserver.net
.
Method B: For Servers on a Custom Port (e.g., 25678)
If your server uses any port other than 25565
, you need two records: an A record and an SRV record.
Part 1 — Create the A Record
First, create an A record that points a subdomain to your server's IP. This will act as a target for the SRV record.
-
Type:
A
-
Name/Host:
play
(or another subdomain likesrv
). -
Value/Points to: Your server's numerical IP address (e.g.,
g2.valuegamenode.com
). -
TTL: Leave at default.
Example A Record:
Type |
Name |
Value (Points to) |
TTL |
---|---|---|---|
A |
play |
g2.valuegamenode.com |
Automatic |
Part 2 — Create the SRV Record
Next, create the SRV record to direct Minecraft to the correct port.
-
Type:
SRV
-
Service:
_minecraft
-
Protocol:
_tcp
-
Name: The subdomain you want players to use. For
play.mycoolserver.net
, enterplay
. -
Target: The full subdomain from the A record you just made:
play.mycoolserver.net
. -
Priority:
0
-
Weight:
5
-
Port: Your server's custom port number (e.g.,
25678
). -
TTL: Leave at default.
Example SRV Record:
Type |
Service |
Protocol |
Name |
Target |
Priority |
Weight |
Port |
---|---|---|---|---|---|---|---|
SRV |
_minecraft |
_tcp |
play |
play.mycoolserver.net |
0 |
5 |
25678 |
Now, players can connect using play.mycoolserver.net
without needing to type the port.
Step 3: Wait and Troubleshoot
DNS changes are not instant. It can take anywhere from a few minutes up to 48 hours for them to work everywhere. This is called DNS propagation.
If it's still not working after an hour, check these common issues:
-
Typos: Double-check that the IP address and all record values are copied exactly. A single wrong number will cause it to fail.
-
Wait Longer: DNS changes can sometimes take a full day to update globally. Be patient.
-
Cloudflare Users: If you use Cloudflare, make sure the cloud icon next to your A record is grey (DNS Only), not orange. The orange cloud (Proxy) is for websites and will block Minecraft connections.
-
Wrong IP: Ensure you used the numerical IP in the A record's "Value" field, not a server hostname.
Once propagation is complete, your custom domain is ready to use!