Intermediate
Lesson 1 of 11 · ~7 min

SRV records

The service-locator record: structure, where helpdesk techs meet them (Teams, SIP, autodiscover), and the format mistakes that break vendor onboardings.

SRV records aren’t routine work the way A and MX are. They show up in specific vendor setups (Teams, SIP, autodiscover), the format is fiddly, and the panels at most DNS hosts don’t always make it easy. When a vendor’s setup wizard tells you to add an SRV and you make a small format mistake, the service fails to discover and the client says the migration to Teams isn’t working.

The SRV structure

_service._protocol.name.   TTL   IN   SRV   priority weight port target.
PieceWhat it is
_serviceService name, prefixed with underscore (_sip, _xmpp-server, _sipfederationtls, _autodiscover)
_protocol_tcp or _udp, prefixed with underscore
nameDomain the service is for (example.com.)
priorityLike MX: lower = preferred
weightLoad balancing among same-priority records
portPort number the service runs on
targetHostname providing the service (must have A/AAAA, never a CNAME)

Example:

_sip._tls.example.com.   3600   IN   SRV   100 1 443 sipdir.online.lync.com.

SIP-over-TLS for example.com is provided at sipdir.online.lync.com on port 443, with priority 100 and weight 1.

The panel at most DNS hosts splits the fields. Read each panel field label carefully; some want the underscore-prefixed _service literally, others add the underscore for you.

Where you’ll actually meet SRV

The cases where you add an SRV are limited but specific:

  • Microsoft 365 / Teams / Skype federation. The M365 setup wizard provides SRV records for SIP and federation discovery (_sip._tls, _sipfederationtls._tcp).
  • SIP / VoIP. Hosted VoIP providers publish SIP-domain records via SRV. The client’s phone system discovers the SIP server by querying _sip._udp.example.com or _sip._tcp.
  • Mail autodiscover for non-Microsoft providers. Fastmail, Apple iCloud, and similar publish autodiscover via SRV records (_caldavs._tcp, _imaps._tcp). M365 uses a CNAME autodiscover.example.com → autodiscover.outlook.com approach instead.

You won’t write SRV records from scratch. The vendor’s wizard tells you exactly what to publish.

What this is NOT

  • “SRV is just like MX.” Similar priority semantics; different structure (adds weight, port, service.protocol naming). Same “target must be a hostname with A/AAAA, not CNAME or IP” rule applies.
  • “All vendors use SRV.” Some do (Teams, SIP). M365 mail uses CNAMEs for autodiscover. The vendor’s documentation tells you what to publish.
  • “SRV at the apex.” The format requires _service._protocol.name. You’re publishing at _sip._tls.example.com, not at the apex itself.

Decision walkthrough

The target got mangled. What happened?
A client onboarded Teams. You published the two SRVs from the M365 wizard. M365's verification check returns 'SRV records not found or incorrect.' `dig SRV _sip._tls.example.com` returns the record but the target field reads `sipdir.online.lync.com.example.com.` instead of `sipdir.online.lync.com.`
What's the cause?
Next lesson