How to Use a Domain for Your Minecraft Server
Set up a domain for your Minecraft server with A records, subdomains, SRV records, DNS-only Cloudflare settings, and correct public IP targeting.
A domain makes your Minecraft server easier to share, but DNS should be added after the raw IP and port already work. DNS cannot fix a closed port.
Basic Setup
For a server on the default Java port 25565, create:
| Record | Name | Value |
| --- | --- | --- |
| A | play | Your public IP |
Players join:
play.example.com
If the server uses a custom port and you do not want players to type it, add an SRV record after the A record. Use the SRV record guide.
Use a Subdomain
Use play.example.com, mc.example.com, or another subdomain. Avoid putting Minecraft on the root domain if the root already serves a website, email, or other services.
Cloudflare Settings
If you use Cloudflare for DNS, normal Minecraft Java hostnames should be DNS-only. The standard orange-cloud proxy is for web traffic, not raw Minecraft Java traffic.
If players cannot join with the public IP and port, fix port forwarding or firewall rules first. DNS only points names to endpoints.
Dynamic Home IPs
If your public IP changes, the domain will point to the old address until you update it. Options include dynamic DNS, a static IP from your ISP, or a hosted server with a stable endpoint.
Validate the Chain
A clean domain setup has this chain:
- Minecraft server listens on the right port.
- Firewall allows the port.
- Public IP works.
- A record points to the public IP.
- SRV record points to the correct target and port if used.
If players see Unknown Host, use the Unknown Host guide.
FAQ
Do I need a domain for a Minecraft server?
No, but a domain is easier to remember and can hide public IP changes if you update DNS.
Can I use a subdomain like play.example.com?
Yes. A subdomain is the common setup for Minecraft servers.
Do I need an SRV record?
Only if you want players to connect without typing a custom port. Port 25565 usually works with a normal A record.
Related Tools
server.properties Generator
Generate a clean Minecraft server.properties baseline for online mode, max players, difficulty, view distance, simulation distance, and command blocks.
Minecraft Port Checker / Troubleshooting Wizard
Build a Minecraft port troubleshooting plan for port 25565, home hosting, VPS firewalls, panel allocations, proxy networks, DNS, and CGNAT.
Backup Schedule Generator
Generate a Minecraft server backup schedule with interval, retention, storage estimate, off-node backup reminder, and cron-style examples.
Related Articles
How to Create an SRV Record for Minecraft Server
Create a Minecraft SRV record for Java servers using the correct _minecraft._tcp name, target hostname, port, priority, weight, and DNS-only settings.
Cloudflare and Minecraft Servers Explained
Understand Cloudflare with Minecraft servers: DNS-only records, orange-cloud proxy limits, SRV records, DDoS expectations, and common connection mistakes.
Public IP vs Local IP for Minecraft Servers
Understand public IP vs local IP for Minecraft servers, what address players should use, how port forwarding works, and why 192.168 addresses fail externally.