In short
To connect a domain to a Minecraft server, first create an A record that points a hostname (for example mc.sunucum.com) to your server IP. If the server runs on a port other than 25565, also add an SRV record with the _minecraft._tcp prefix that targets that A record and sets the port. If you use Cloudflare, the proxy must be off (DNS only), or players can't connect.
In this guide
- Key concepts: A record, SRV record and TTL
- Which record do you need?
- Step 1: Create the A record
- Step 2: Create the SRV record
- If you use Cloudflare: the proxy must be off
- Step 3: Test the records
- Subdomains for multiple servers
- Troubleshooting table
- Next step: connect your domain to a server with a fixed IP
To give players oyna.sunucum.com instead of a hard-to-remember address like 185.x.x.x:25601, you only need two DNS records: an A record that points to your server's IP, and, if needed, an SRV record that carries the port. This guide walks you through creating both correctly, avoiding the most common Cloudflare proxy mistake and testing that the records work.
Key concepts: A record, SRV record and TTL
- A record: Maps a hostname (for example
mc.sunucum.com) to an IPv4 address. It carries only the IP, not the port. - SRV record: Tells clients which host and which port a specific service runs on. Before connecting, the Minecraft Java Edition client looks up an SRV record in the form
_minecraft._tcp.alanadi; if one exists, it connects to the port and target listed there. - TTL: Sets how long DNS servers cache the record. A low TTL during setup makes changes propagate faster.
How does the Minecraft client resolve an address?
When a player types oyna.sunucum.com, the Java Edition client follows this order: first it looks up the _minecraft._tcp.oyna.sunucum.com SRV record. If it exists, the client uses the target name and port from it, gets the IP from the target's A record and connects. If there's no SRV record, it checks the oyna.sunucum.com A record directly and tries the default port 25565. If the player types a port explicitly (oyna.sunucum.com:25601), the SRV lookup is skipped. Knowing this order tells you which record is in play when you troubleshoot.
Which record do you need?
| Situation | Records needed | Address players type |
|---|---|---|
| Server on the default port 25565 | A record only | oyna.sunucum.com |
| Server on a different port (e.g. 25601) | A record + SRV record | oyna.sunucum.com |
| Different port, no SRV | A record only | oyna.sunucum.com:25601 |
| Bedrock players | A record only (Bedrock doesn't support SRV) | Address and port entered separately |
On shared game panels, your server is often assigned a port other than 25565. In that case, an SRV record is the only way for players to connect without typing a port.
Step 1: Create the A record
- Log in to the DNS panel where you manage your domain (your registrar or Cloudflare).
- Add a new record and choose type A.
- Name: Enter
mc. This createsmc.sunucum.com. - Value (IPv4 / Content): Enter your server's IP address. Don't add the port; A records can't hold a port.
- TTL: Choose Auto or a low value like 300 seconds.
- If you use Cloudflare, make sure Proxy status is set to DNS only (gray cloud).
If your server is on port 25565, you're done; players can connect with mc.sunucum.com.
Step 2: Create the SRV record
An SRV record works like a signpost between the address players type and the actual server. The example below points oyna.sunucum.com to a server on port 25601:
| Field | Value | Explanation |
|---|---|---|
| Type | SRV | Record type |
| Name | _minecraft._tcp.oyna | Service, protocol and the subdomain players will type |
| Priority | 0 | 0 is fine for a single server |
| Weight | 5 | Doesn't matter for a single server; any value works |
| Port | 25601 | Your server's actual port |
| Target | mc.sunucum.com | The A record from Step 1; don't enter an IP address |
In DNS zone syntax, the resulting record looks like this:
_minecraft._tcp.oyna.sunucum.com. 300 IN SRV 0 5 25601 mc.sunucum.com.If you want players to connect with the root domain (sunucum.com), enter only _minecraft._tcp in the Name field. Some DNS panels show separate Service (_minecraft), Protocol (_tcp) and Name fields for SRV; in that case, split the values into the matching boxes.
The three most common SRV record mistakes
- Putting an IP in the target: The SRV standard requires a hostname as the target. With an IP, many panels reject the record or the client can't resolve it.
- Adding the domain twice: If the panel appends the domain automatically and you type
_minecraft._tcp.oyna.sunucum.comin the Name field, the record becomes...sunucum.com.sunucum.com. - Pointing the target at a CNAME: The SRV target must be an A (or AAAA) record directly; a CNAME in between violates the standard and can cause problems.
If you use Cloudflare: the proxy must be off
Cloudflare's orange-cloud proxy mode only carries web traffic (HTTP/HTTPS). Minecraft uses its own TCP protocol. A proxied A record returns Cloudflare's addresses instead of your IP, and players get Connection timed out.
- In the Cloudflare dashboard, go to DNS > Records.
- Click the orange cloud next to the
mcA record and switch it to DNS only (gray). - Make sure the SRV record's target is this gray-cloud record.
With this setting, your server IP becomes visible in DNS lookups. Protection for Minecraft traffic depends not on your DNS provider but on the DDoS protection of the infrastructure hosting your server.
Step 3: Test the records
After adding the records, verify DNS before trying the game. In Windows Command Prompt:
nslookup mc.sunucum.com
nslookup -type=SRV _minecraft._tcp.oyna.sunucum.comIn PowerShell:
Resolve-DnsName mc.sunucum.com -Type A
Resolve-DnsName _minecraft._tcp.oyna.sunucum.com -Type SRVOn Linux or macOS:
dig +short mc.sunucum.com A
dig +short SRV _minecraft._tcp.oyna.sunucum.comThe SRV lookup output should show priority, weight, port and target (for example 0 5 25601 mc.sunucum.com.). The A lookup should return your server's real IP, not a Cloudflare address.
If DNS is correct but you still can't connect in-game, flush your computer's DNS cache and fully close and reopen Minecraft:
ipconfig /flushdnsSubdomains for multiple servers
You can run several servers under the same domain. Just create a separate SRV record for each server and point them all to the same A record (same IP); only the port number differs:
_minecraft._tcp.survival.sunucum.com. 300 IN SRV 0 5 25601 mc.sunucum.com.
_minecraft._tcp.skyblock.sunucum.com. 300 IN SRV 0 5 25602 mc.sunucum.com.
_minecraft._tcp.test.sunucum.com. 300 IN SRV 0 5 25603 mc.sunucum.com.This setup has another advantage: when you move your server to a different machine, you only change the IP in the mc A record, and every SRV record follows to the new address automatically. Lowering the A record's TTL a day before the move makes the switch faster for players.
Practical tips for choosing a domain
- Short and easy to type: Players often type the address by hand from a Discord message or a video. A short domain without special or accented characters (such as Turkish letters) reduces typos.
- Meaningful subdomain: Prefixes like
oyna.,mc.orplay.make it obvious the address is a game server. - Don't clash with your website: If a website runs on your root domain with the Cloudflare proxy on, use a separate, unproxied subdomain for Minecraft. Your website stays protected while Minecraft traffic goes straight to the server.
Troubleshooting table
| Symptom | Likely cause | Fix |
|---|---|---|
| Unknown host | Record hasn't propagated yet, or the name is misspelled | Check with nslookup and wait for the TTL to expire |
| Connection timed out | Cloudflare proxy on, or wrong IP in the A record | Set the proxy to DNS only and verify the IP |
| Connection refused | Wrong port in the SRV record, or the server is offline | Compare the port in your panel with the SRV record |
| IP:port works, domain doesn't | SRV Name field is wrong | Check the _minecraft._tcp prefix and the doubled-domain mistake |
| Bedrock players can't connect | Bedrock doesn't read SRV | On Bedrock, enter the address and port separately |
For connection errors not caused by DNS, see Minecraft connection problems by error message. If you run a proxy network like Velocity, point the SRV record to the proxy's port, not the backend servers; details are in setting up a Velocity network.
Next step: connect your domain to a server with a fixed IP
An SRV record only makes sense with a server whose IP and port don't change. For a small friend server or a new community, the OB-MC-1 Minecraft server with 2 CPUs, 2GB RAM and 20GB NVMe SSD is enough to get started; you can copy the IP and port shown in the web panel straight into your A and SRV records.
OyunBulut servers run in our Istanbul data center and include DDoS protection; with the Cloudflare proxy off, your traffic is protected by this infrastructure. As your player count grows, compare Minecraft server plans for more RAM and CPU, or if you'd rather start small, get your domain working right away with the entry-level OB-MC-1 plan.
Frequently asked questions
Do I need an SRV record if my Minecraft server is on port 25565?
No. Since 25565 is the default port, an A record pointing to the server IP is enough; players connect by typing just the domain.
Can I put an IP address as the SRV record target?
No. The SRV target must be a hostname. First create an A record pointing to the IP, then enter that A record's name as the SRV target.
Why can't players connect to my Minecraft server with the Cloudflare proxy on?
Cloudflare's standard proxy only carries HTTP and HTTPS traffic. Minecraft traffic can't pass through it, so you need to set the record to DNS only (gray cloud).
How long does it take for a DNS record to work?
New records usually work quickly; if you changed an existing record, some players may see the old address until the old record's TTL expires.
Can Bedrock players connect using an SRV record?
No. Bedrock Edition doesn't read SRV records; Bedrock players must enter the domain and port number in separate fields.