How do I create an SRV record?

Post Reply
User avatar
kraze
Former staff
Former staff
Posts: 4362
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Sep 17, 2010 9:06 am
Location: California

How do I create an SRV record?

Post by kraze »

A few applications support SRV records, which allow you to set up a custom DNS entry that includes the DNS and port for the client to connect. For instance, Minecraft and TeamSpeak 3 both allow this.

Let's say that you have the domain name mydomain.com. You currently have a Minecraft server running at 1.2.3.4, port 28000, and have an "A" record already set up pointing subdomain mc to that IP -- meaning that clients can connect to mc.mydomain.com:28000 and join the server. But, it would be easier if they could connect to just mc.mydomain.com and leave off the port. Here's how you could accomplish that:
  1. Visit the Domains page in your control panel.
  2. Under the "mydomain.com" domain, click the empty Subdomain field at the bottom.
  3. Enter _minecraft._tcp.mc.
  4. Select "SRV" from the drop-down menu for the new subdomain.
  5. Click the empty Target field for the new subdomain.
  6. Enter mc.mydomain.com:28000.
  7. At the bottom of the page, click "Submit changes".
  8. Wait a minute or so for the change to take effect.
If you have multiple servers running on that same IP, you could repeat these instructions to create an SRV entry for each one. In doing this, you would need to change the Subdomain step to use something other than "mc" (such as "mc2", "mc3", etc), and change the Target step to use each server's corresponding port.

You could also make it so the bare mydomain.com works. To do this, enter _minecraft._tcp instead of _minecraft._tcp.mc as the SRV subdomain. If you have a website at mydomain.com, it will continue to work when you do this, because only Minecraft will look for the special _minecraft._tcp SRV entry.

With TeamSpeak3, the same procedure applies, except that you'd begin the subdomain with _ts3._udp instead of _minecraft._tcp.
Post Reply