Knowledgebase MintServers Game Panel How to Connect a Domain to Your Minecraf...

How to Connect a Domain to Your Minecraft Server Using Cloudflare

Want to make your Minecraft server more professional and easier to remember? Setting up a custom domain for your Minecraft server lets players connect using an address like play.yourdomain.com instead of a complicated IP and port number. This step-by-step guide will show you exactly how to connect your domain to your Minecraft server using Cloudflare's DNS management.

ℹ️ Prerequisite: Purchase Your Domain
Before diving into the setup, you need to make sure you actually own a domain and have it managed by Cloudflare. If you haven't done this yet, you will need to purchase your domain directly through Cloudflare's domain registrar. Once your domain is purchased and active in your Cloudflare account, you can move on to the next steps!

Step 1: Get Your Minecraft Server Details

01
Log into your MintServers game panel.
02
Click on Subdomain in the left sidebar. MintServers Subdomain Tab
03
On the right side, find the How to connect a domain column.
04
Note down the Address (target) and Port values. You will need these for Cloudflare! Server Target and Port

Step 2: Create DNS Records in Cloudflare

How you set up your domain depends entirely on whether you have a standard random port or if you upgraded to a Dedicated Port. Choose the method that matches your server!

💡 Tip: Use A Dedicated Port!
If you upgrade your server to use a Dedicated IP / Port from the billing area, you are assigned the default game port (25565 for Java or 19132 for Bedrock). Having a dedicated port means you get to skip the complicated SRV records completely and just use a simple A Record! It makes joining a breeze and allows you to easily link it to a custom domain using simple "A record"!

Method A: Using an A Record (For Dedicated Ports)

If your server uses port 25565, this is all you need to do:

01
In your Cloudflare dashboard, select your domain and click on DNS in the left sidebar.
02
Click Add Record.
03
Select A as the record type.
04
For the Name field, enter the prefix you want (like play or mc).
05
For the IPv4 address field, enter your server's numerical IP address (do not include the port number).
06
Turn Proxy status to DNS only (Grey cloud) and click Save!

Method B: Using an SRV Record (For Standard Ports)

If your server has a random port (like 25666), you must use an SRV record to direct traffic properly.

01
In your Cloudflare dashboard, select your domain. Cloudflare Domain Select
02
Click on DNS in the left sidebar. Cloudflare DNS Tab
03
Click Add Record. Add DNS Record
04
Select SRV as the record type.
05
For the Name field, enter _minecraft._tcp.play (Replace "play" with whatever subdomain you want your players to type).
06
Set Priority to 1 and Weight to 1.
07
Set Port to the exact port number you copied from your server details.
08
Set Target to the Address you copied from your server details. SRV Record Settings
09
Click Save.
Launch Your Own Game ServerUnlimited RAM · Unlimited slots · From $9.99/monthPick Your Game

Testing Your Domain Connection

After setting up your DNS records, it may take a few minutes to several hours for the changes to propagate across the internet. To test if your domain is properly connected:

01
Open Minecraft Java Edition.
02
Go to Multiplayer, then Add Server.
03
Enter your new domain (e.g., play.yourdomain.com) in the Server Address field.
04
Click Done and try to connect to your server!

Related Guides

How To Get A Dedicated IP For Your Server
Get the default game port so you can skip SRV records and use a plain A record.

🛠️ Troubleshooting Common DNS Issues

Can't connect to the server

Verify that your record is correctly configured with the right target and port. Sometimes it just takes time, so wait up to 24 hours for full DNS propagation.

The Sneaky Trailing Dot

If you are using a manual zone file entry or a provider other than Cloudflare for an SRV record, ensure your target address ends with a period (e.g., ultra.eu.2.mintservers.com.). Without this trailing dot, some systems will incorrectly append your domain name to the end of the target, breaking the connection!

Flush your DNS cache

If you recently changed the records, your computer might be caching old data. Open your Command Prompt on Windows and type ipconfig /flushdns to clear it out.

SRV record format

Double-check the format of your SRV record name. It must be exactly _minecraft._tcp.yoursubdomain to work properly.

Server offline

Ensure your Minecraft server is actually running on the MintServers panel and is accessible via its direct numerical IP first!

By following this guide, you have successfully connected your domain to your Minecraft server using Cloudflare. Players can now join your server using your custom domain, making it more professional and easier to remember.

Still stuck?

Our team is happy to help. Open a ticket through the live chat button in the bottom-right corner of our website, or join our Discord and open a ticket there.

Join our Discord

Was this article helpful?

Minecraft + 59 More Games · One Plan

Start Your Minecraft Server in 60 Seconds

Unlimited Slots & RAM One-Click Modpacks & Plugins 24/7 Expert Support
Launch My Server From $9.99/month  ·  24-hour money-back guarantee
Minecraft server hosting