You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

如何配置SRV DNS记录实现第三方游戏服务器的域名访问?

Using DNS Records to Let Players Connect to Your Third-Party Hosted Minecraft Server via mc.scriptware.org

Absolutely! SRV records are exactly what you need here—they’re designed to map a custom domain (like your mc.scriptware.org) to any target server, whether it’s hosted on your own hardware or by a third-party provider. You don’t need ownership of the server’s host to set this up; you just need the server’s IP address and port number.

Here’s how to configure it step by step:

1. Understand the Minecraft SRV Record Requirements

For Minecraft Java Edition, the game automatically checks for an SRV record starting with _minecraft._tcp.. Your record needs these key parameters:

  • Service: _minecraft
  • Protocol: _tcp
  • Name: mc (this ties directly to your subdomain mc.scriptware.org)
  • Priority: 0 (lower numbers mean higher priority; 0 is standard for a single server)
  • Weight: 5 (used for load balancing across multiple servers; 5 works perfectly for a single server)
  • Port: The port number you use to directly connect to your server (e.g., default 25565, or the custom port your third-party host provided)
  • Target: Either the IP address of your hosted server, or the domain name your host gave you (if they provided one—DNS will automatically resolve it to the correct IP)

2. Add the SRV Record in Your Domain Provider’s Dashboard

Every domain host has a slightly different interface, but the core steps are consistent:

  • Log into your domain management console (e.g., Cloudflare, GoDaddy, Namecheap)
  • Navigate to the DNS records management section
  • Create a new record, select SRV as the record type
  • Fill in the fields based on your provider’s layout:
    • Some providers split fields into "Service", "Protocol", and "Hostname": enter _minecraft, _tcp, and mc respectively
    • Others might have a single "Name" field where you input _minecraft._tcp.mc
    • Enter your priority (0), weight (5), port number, and target IP/host domain
  • Save the record, then wait for DNS propagation (usually 5-30 minutes, depending on your TTL setting)

3. Verify Your SRV Record is Working

You can test if the record is configured correctly using command-line tools:

# Using dig (Linux/macOS)
dig _minecraft._tcp.mc.scriptware.org SRV

# Using nslookup (Windows/Linux/macOS)
nslookup -type=SRV _minecraft._tcp.mc.scriptware.org

If the output shows your configured port and target server, your setup is successful!

Bonus Tips

  • For Minecraft Bedrock Edition, you’ll need an SRV record starting with _minecraft._udp. instead of _tcp, using your Bedrock server’s port (default 19132).
  • To speed up DNS propagation, lower your TTL value (e.g., to 300 seconds/5 minutes) before making changes—this tells DNS servers to refresh their cache more quickly.
  • If your third-party host ever changes your server’s IP, you only need to update the target field in your SRV record; players won’t have to adjust anything on their end.

内容的提问来源于stack exchange,提问作者Tim Willems

火山引擎 最新活动