Applies to: DNS records in cPanel Zone Editor, Cloudflare and other DNS providers

An SRV record tells programs which server and port provide a service for a domain. Normal A records only give an IP address; SRV adds the port and a priority. Programs that support SRV look it up automatically, for example VoIP (SIP) phones, chat servers (XMPP), Microsoft Teams and Skype for Business setups, email auto-configuration, and Minecraft: Java Edition.

The parts of an SRV record

_service._protocol.name.   TTL   IN SRV   priority weight port target
_sip._tls.example.com.     3600  IN SRV   10       60     5061 sip.example.com.
  • Service and protocol: for example _sip._tls, _xmpp-client._tcp or _minecraft._tcp.
  • Priority: lower numbers are tried first.
  • Weight: shares traffic between servers with the same priority.
  • Port: the port the service listens on.
  • Target: the host name of the server, which needs its own A record. It can’t be an IP address.

Example: Minecraft on a custom port

Minecraft Java players normally have to type play.example.com:25566 when your server runs on another port. With an SRV record they just type play.example.com:

mc.example.com.                     IN A    203.0.113.30
_minecraft._tcp.play.example.com.   IN SRV  0 5 25566 mc.example.com.

Minecraft: Bedrock Edition doesn’t use SRV records, so Bedrock players still enter the port.

Add it in cPanel

  1. Open Domains › Zone Editor and click Manage next to the domain.
  2. Click Add Record and choose type SRV.
  3. Name: _minecraft._tcp.play.example.com. Fill in Priority (0), Weight (5), Port (25566) and Target (mc.example.com). Save.

At Cloudflare and many other providers, the SRV form has separate fields for the service (_minecraft), protocol (TCP) and name (play).

Check it

dig +short SRV _minecraft._tcp.play.example.com
nslookup -type=SRV _minecraft._tcp.play.example.com

We tested these records on a BIND 9 DNS server: the query returned 0 5 25566 mc.example.com.. After a change, allow time for the TTL to pass, and flush your DNS cache if your computer still sees the old answer.

Hosting a Minecraft server: Minecraft server on Linux. Other record types in cPanel: add a CNAME record.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)