SRV Record Builder

Build a DNS SRV record from service, proto, name, priority, weight, port and target.

Open tool

Overview

The SRV record builder assembles a DNS SRV record from its component parts: service name, protocol, parent domain, priority, weight, port, and target hostname. Pick each field and the builder emits the formatted RDATA plus the matching owner name (_service._proto.example.com) ready to paste into your zone file.

Administrators setting up XMPP, Minecraft, SIP, Active Directory, or LDAP service discovery, and developers integrating with autoconfiguration mechanisms, all need a way to compose SRV records without typos. Long-tail keywords covered: build DNS SRV record online, SRV priority and weight explained, and Minecraft SRV record example.

How it works

SRV records, defined in RFC 2782, advertise the location of a named service. The owner name is structured: _service._proto.name, where _service is the service identifier (with a leading underscore), _proto is _tcp or _udp, and name is the parent domain. The RDATA carries four fields — priority weight port target — separated by spaces. Lower priority numbers win; clients pick a server from the lowest-priority bucket. Within a priority bucket, weight controls load balancing — a server with weight 20 receives twice the traffic of a server with weight 10.

The target must be an absolute hostname pointing to an A or AAAA record. A CNAME target is not valid per the spec, though many resolvers tolerate it.

Examples

  • XMPP server: owner _xmpp-server._tcp.example.com, RDATA 10 0 5269 xmpp.example.com..
  • SIP UDP: owner _sip._udp.example.com, RDATA 0 0 5060 sip.example.com..
  • Minecraft (custom convention): owner _minecraft._tcp.example.com, RDATA 0 5 25565 mc.example.com..
  • Two-server failover: 10 50 443 primary.example.com. and 20 50 443 backup.example.com. — the backup only activates if the primary is unreachable.

FAQ

What is the difference between priority and weight?

Priority is the failover order — lower numbers are tried first. Weight balances load across servers within the same priority bucket. Use priority for primary/backup, weight for load distribution.

Can I point an SRV record at a CNAME?

The spec says no — the target must be a canonical A or AAAA name. Most resolvers tolerate a CNAME target in practice, but some strict implementations reject it.

Why are some clients ignoring my SRV record?

Browsers do not look up SRV for HTTP — they only check A/AAAA on the hostname. SRV-aware protocols (XMPP, SIP, Kerberos, LDAP) consult it; HTTP does not.

Do weights have to add up to a specific number?

No. The probability of selecting a server is serverWeight / sumOfWeightsInBucket. Use any integers you like; 0 is special and means "only selected if no other servers are available".

Try SRV Record Builder

An unhandled error has occurred. Reload ×