Skip to content

Instantly share code, notes, and snippets.

@jakobkmar
Last active September 9, 2024 22:26
Show Gist options
  • Save jakobkmar/9a76e78a8bb8b24b39a83f567d8b49b9 to your computer and use it in GitHub Desktop.
Save jakobkmar/9a76e78a8bb8b24b39a83f567d8b49b9 to your computer and use it in GitHub Desktop.
Setup a Minecraft SRV record in Hetzner DNS

Setup a Minecraft SRV record in Hetzner DNS

With an SRV record you can let your domain point to a Minecraft server without subdomains and without the need for taking the whole @ namespace.

Create a simple A record

First, we'll create a normal A record which the SRV record can point to. Let's choose play.yourdomain.com for this.

image

Create the SRV record

Select SRV as the record type and enter _minecraft._tcp as its name.

image

Now click on the value field, which will open the following popup. Choose a priority and weight. Enter the correct port which your Minecraft Server or Proxy is listening on. The default Minecraft port is 25565. For the target, enter the A record including your full domain. Also, don't forget to put a dot at the end of that domain.

image

Check the zone file entry

Optionally, you can now check the zone file entry to see if everything is correct.

To do this, open the zone file: image

The zone file should contain this line:

_minecraft._tcp		IN	SRV	0 5 25565 play.yourdomain.com.

Done

You can now connect to your Minecraft server using just yourdomain.com without the need for an A record taking the @ namespace. 🙂

@FoxyPy1
Copy link

FoxyPy1 commented May 4, 2024

does this also work for a github eaglercraftX server?

@jakobkmar
Copy link
Author

@Scard1665 I don't know what that is. However, the SRV lookup is done by the Minecraft client itself, which means any third party client would explicitly have to implement that feature as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment