Logo

MonoCalc

/

SRV Record Generator

Networking

Quick-fill from well-known service template

Service Definition

Without underscore prefix, e.g. sip
e.g. example.com
≈ 1h

Full zone file notation with trailing dots

Target Servers

0=highest
e.g. server.example.com

Record Name Preview

RFC 2782

_service

.

_tcp

.

example.com.

3600

IN SRV

priority weight port

target.

_service = service_tcp = protocolpriority · weight · porttarget (FQDN.)

Generated SRV Record

About This Tool

🌐 SRV Record Generator – Build RFC 2782 DNS Service Records

DNS SRV (Service) records are a powerful mechanism defined in RFC 2782 that let clients discover the host and port for a specific network service automatically — without hardcoding server addresses. They are the backbone of VoIP dial plans (SIP), instant messaging federation (XMPP), enterprise directory services (LDAP), Kerberos authentication, Minecraft multiplayer, CalDAV calendaring, and dozens of other protocols. This generator assembles perfectly formatted SRV records, complete with the correct underscore prefixes and trailing dots, so you can paste them directly into a BIND zone file or DNS control panel.

📐 SRV Record Anatomy

Every SRV record follows the zone-file format defined in RFC 2782:

_service._protocol.domain. TTL IN SRV priority weight port target.

For example, a SIP server record looks like:

_sip._tcp.example.com. 3600 IN SRV 10 20 5060 sipserver.example.com.
FieldExamplePurpose
_service_sipService symbolic name with underscore prefix
_protocol_tcpTransport protocol (TCP, UDP, TLS, SCTP)
domain.example.com.Zone name with trailing dot (FQDN)
TTL3600Cache lifetime in seconds (3600 = 1 hour)
IN SRVIN SRVInternet class, Service record type
priority10Lower = higher preference; try smallest first
weight20Load share among same-priority targets
port5060TCP/UDP port where service listens
target.sipserver.example.com.FQDN of the target server

⚖️ Priority and Weight – How Client Selection Works

Priority determines which server group clients try first. Clients must attempt all servers with the lowest priority value before falling back to higher priority values. A primary server with priority 10 is always tried before a failover server with priority 20.

Weight controls load distribution within a priority tier. Clients use weighted random selection so that a server with weight 60 receives approximately 60% of connections while a sibling at weight 40 handles the remaining 40%. Setting weight to 0 signals that this server should only receive connections when all higher-weight peers are unavailable.

📊 Traffic share formula

Traffic % = (server weight / sum of weights at same priority) × 100

🔁 Failover Configuration

Configuring failover with SRV records is straightforward — assign your primary servers priority 10 and backup servers priority 20. RFC 2782-compliant clients will never contact the priority-20 servers unless all priority-10 entries are unreachable. This multi-priority approach is used by enterprise LDAP, SIP trunks, and Kerberos KDC discovery.

🏷️ Zone File vs. Registrar Format

When entering records directly into a DNS server's zone file (BIND, PowerDNS, NSD), use zone file format: the record name includes the full domain with a trailing dot, and the target is also a fully qualified domain with a trailing dot. The trailing dot tells the DNS server the name is absolute and should not have the zone name appended.

Most DNS registrar control panels and cloud DNS consoles (Cloudflare, Route 53, Namecheap) handle trailing dots for you. Switch to registrar format in the generator to produce shortened record names like _sip._tcp instead of _sip._tcp.example.com.

⏱️ Choosing the Right TTL

TTL (Time To Live) controls how long resolvers cache your SRV record. A low TTL (e.g., 300 = 5 minutes) enables quick DNS changes during migrations or incident response but increases query load on your authoritative name servers. A high TTL (e.g., 86400 = 24 hours) reduces query volume but means changes propagate slowly. For active services, 3600 (1 hour) is a common balance.

🌍 Common SRV Use Cases

ProtocolSRV NameDefault PortUse Case
SIP (VoIP)_sip._tcp / _sip._udp5060Voice & video calls
SIP Secure_sips._tcp5061Encrypted VoIP over TLS
XMPP Client_xmpp-client._tcp5222Chat client connections
XMPP Server_xmpp-server._tcp5269XMPP server federation
LDAP_ldap._tcp389Directory service queries
LDAPS_ldaps._tcp636Secure LDAP
Kerberos_kerberos._tcp/_udp88Authentication tickets
Minecraft_minecraft._tcp25565Game server discovery
CalDAV_caldav._tcp8443Calendar sync

✅ Validation Tips

The generator warns you about common misconfigurations in real time. Key rules to keep in mind:

  • Service name — alphanumeric characters and hyphens only; no leading or trailing hyphens; the underscore prefix is added automatically.
  • Target host — must be a valid FQDN. The tool appends a trailing dot in zone file mode. Do not set the target to the bare domain root . unless you intentionally want to disable the service (RFC 2782 null target).
  • Port range — must be between 1 and 65535. Port 0 is not valid for SRV.
  • TTL — a value below 60 seconds is technically valid but operationally unusual and will trigger a warning.

🛠️ Tips for Network Admins

  • Use the well-known service template buttons to auto-populate the correct service name, protocol, and default port for common protocols — then only fill in your domain and target host.
  • For load balancing across multiple data centers, add targets with the same priority but different weights that reflect your server capacities.
  • For a hot standby, set your standby server to priority 20 with weight 100 — it receives no traffic until all priority-10 targets fail.
  • Always test your SRV records after publishing with dig: dig SRV _sip._tcp.example.com

Frequently Asked Questions

Is the SRV Record Generator free?

Yes, SRV Record Generator is totally free :)

Can I use the SRV Record Generator offline?

Yes, you can install the webapp as PWA.

Is it safe to use SRV Record Generator?

Yes, any data related to SRV Record Generator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is an SRV DNS record?

An SRV (Service) DNS record specifies the location — hostname and port number — of servers for specific services. Defined in RFC 2782, it allows service discovery over DNS and is used by protocols such as SIP (VoIP), XMPP (instant messaging), LDAP, Kerberos, and Minecraft multiplayer servers.

How does this SRV Record Generator work?

Enter your service name, protocol, domain, priority, weight, port, and target host. The tool assembles these into a valid zone-file SRV record in the format: _service._protocol.domain. TTL IN SRV priority weight port target. For multi-target setups, add additional rows and the tool also shows load-distribution percentages.

What do Priority and Weight mean in an SRV record?

Priority determines which server clients try first — lower values are tried before higher values. Weight is used when multiple records share the same priority; clients perform weighted random selection so that a server with weight 60 receives roughly 60% of the traffic compared to a server with weight 40.

Why does the target hostname end with a dot?

In DNS zone file notation, a trailing dot on a hostname marks it as a Fully Qualified Domain Name (FQDN) and prevents the DNS server from appending the current zone name to it. For example, sipserver.example.com. is the correct zone-file form. This tool automatically appends the trailing dot when generating zone-file output.

What is the difference between zone file format and registrar format?

Zone file format includes the full domain name with a trailing dot in the record name and all FQDNs, suitable for BIND, PowerDNS, or similar DNS server software. Registrar format omits the zone suffix from the record name because most DNS control panels auto-append the domain, so you only enter _sip._tcp instead of _sip._tcp.example.com.

Are the well-known service templates accurate?

The built-in templates (SIP, XMPP, LDAP, Minecraft, CalDAV, Kerberos, and others) use the IANA-registered default ports and protocols. However, your actual deployment may use non-standard ports. Always verify port numbers against your service documentation and DNS provider requirements.