Search code examples
dnsminecraftsrv

How to redirect srv dns to other domain


I got a domain and want people to people able to join a server for a game I'm currently running.

The server is running by a third party host. For now, I got a direct IP address and port I can connect through, but now I want others to be able to connect to a direct IP address. Now I have read about SRV records but I have only found examples where people want to connect to a server on their own host.

Is it possible to make a DNS record so people could connect by only entering mc.scriptware.org

How would I go and do this?

The domain is on Cloudflare and I have tried this: Picture


Solution

  • You can point your hostname to any IP you want.

    Just create A record with your game server IP.

    You DNS configuration should contain following entry:

    mc.scriptware.org.   A   0.0.0.0
    

    where 0.0.0.0 is your game server's real IP address.


    EDIT:

    After some more research I found that minecraft client supports SRV records.

    You just have to create following DNS record:

    _minecraft._tcp.mc  SRV  0 1 PORT mc.scriptware.org.
    

    Where PORT is your server's port number.


    It also may be good idea to set different name for subdomain that points to server (A record subdomain) eg. mcsrv.scriptware.org instead of mc.scriptware.org.

    Without this game client probably will skip searching for SRV record, because mc subdomain exists and points to an IP address.