Skip to content
Domains and DNS2 min read

What is an SRV record?

Short answer

An SRV (service) record is a DNS record that says where a specific service runs on your domain: the hostname, the port, a priority and a weight. Apps such as SIP voice calling, XMPP chat, email clients and games like Minecraft use it to discover the service automatically, without the user typing a port.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Format
  2. Common examples
  3. Practical example: checking it
  4. Common mistakes
  5. On ArabyHost

An A record only says where the server is; SRV adds which port and which protocol. So a user can type example.com into an app, and the app works out for itself that the service lives on sip.example.com, port 5060.

Format

_service._proto.name.   TTL   IN  SRV  priority  weight  port  target
_sip._tcp.example.com.  3600  IN  SRV  10        60      5060  sip.example.com.
Field Meaning
_service Service name, e.g. _sip or _xmpp-client
_proto Protocol: _tcp or _udp
priority Lowest is tried first, as with MX
weight Load share among records with the same priority
port The port the service listens on
target Hostname, which must have an A or AAAA record

Common examples

Service Name Port
SIP voice _sip._udp or _sip._tcp 5060
XMPP chat _xmpp-client._tcp 5222
Minecraft server _minecraft._tcp 25565
Outlook (Autodiscover) _autodiscover._tcp 443
Email autoconfiguration (IMAP and submission) _imaps._tcp and _submission._tcp 993 and 587

Practical example: checking it

dig SRV _sip._tcp.example.com +short

The answer lists priority, weight, port and target in that order, for example 10 60 5060 sip.example.com..

Common mistakes

  • How the name is entered: some editors want service and protocol in separate fields, others want the full _sip._tcp. Follow the editor’s format so the domain isn’t appended twice.
  • Target is a CNAME or an IP: the target must be a hostname with an A or AAAA record, never a CNAME or a bare number.
  • Target of .: means the service is deliberately not available on this domain.
  • SRV doesn’t change website ports: browsers don’t use SRV for HTTP, so it can’t hide a port like :3000 from a site’s URL.

On ArabyHost

If your nameservers are ns1.arabicode.com and ns2.arabicode.com, add the SRV record in the control panel’s DNS editor with exactly the values the service asks for, then check it with the DNS lookup tool. Game and VoIP servers usually need a server of their own, and ArabyHost doesn’t offer VPS yet, so in that case the SRV record will point to a service running with another provider.

FAQ

Does my website need an SRV record?

Usually not. Ordinary websites only need A and CNAME records; SRV is requested by specific services such as VoIP, chat, some email clients and games.

What's the difference between priority and weight?

Priority sets the order, with the lowest number tried first. Weight spreads connections among records that share the same priority; a higher weight gets a bigger share.

Why do SRV names start with an underscore?

The underscore separates the service and protocol labels from ordinary subdomain names, so _sip._tcp can never clash with a real subdomain.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.