What is an SRV Record in DNS?

An SRV (Service) record is a specialized DNS record used to specify the location (hostname and port number) of servers for specific services. It is widely used for VoIP (SIP), instant messaging (XMPP), Microsoft 365, and gaming servers like Minecraft.

Verify your Service Records

Check if your SRV weights, priorities, and target ports are configured correctly.

Check SRV Records Online

The strict SRV Formatting Rule

Unlike an A Record that applies to an entire domain, an SRV record is attached to a specific service and protocol. The name of an SRV record must always follow this exact format:

_service._protocol.domain.com

  • Service: The symbolic name of the desired service, starting with an underscore (e.g., _sip or _minecraft).
  • Protocol: The transport protocol, starting with an underscore (usually _tcp or _udp).
  • Domain: The domain name the record belongs to.

The Anatomy of SRV Values

Once you format the name correctly, the actual value of the SRV record consists of four specific parts, separated by spaces:

10 50 5060 server1.example.com

  • Priority (10): Determines the order in which clients should attempt to contact the servers. Lower numbers have higher priority (just like MX records).
  • Weight (50): A load-balancing mechanism for records with the same priority. A server with a weight of 50 will receive roughly five times as much traffic as a server with a weight of 10.
  • Port (5060): The specific TCP or UDP port on which the service is listening.
  • Target (server1...): The hostname of the server providing the service.

SRV Record FAQ

No. The target field of an SRV record must be a valid hostname (e.g., host.example.com), never a raw IP address. The client will resolve this hostname to an IP address in a subsequent DNS lookup.

According to strict RFC DNS standards, the target of an SRV record must not be an alias (CNAME record). It must point directly to a hostname that has an A or AAAA record. While some modern resolvers might forgive this mistake, it will cause unpredictable failures.

If you want to explicitly tell clients that a service is not supported on your domain (stopping them from continuously searching), you can publish an SRV record where the target is a single dot (.). For example: 0 0 0 .