Understanding and Adding SRV Records
An SRV (Service) record is a DNS record type that specifies the location (hostname and port) of servers for specific services. Unlike A records which simply point to an IP address, SRV records include additional information about the service, protocol, priority, weight, and port number.
When You Need SRV Records
- Microsoft 365 / Teams: SRV records for SIP federation and instant messaging.
- VoIP services: SIP (Session Initiation Protocol) configurations.
- Game servers: Minecraft, TeamSpeak, and other games use SRV records.
- XMPP / Jabber: Chat services that rely on SRV for server discovery.
SRV Record Format
An SRV record has the following components:
- Name:
_service._protocol.yourdomain.com(e.g.,_sip._tcp) - Priority: Lower values are preferred (similar to MX records).
- Weight: For load balancing between servers with the same priority. Higher weight receives more traffic.
- Port: The port number the service runs on.
- Target: The hostname of the server providing the service.
Adding an SRV Record in DirectAdmin
- Log in to DirectAdmin and go to DNS Management.
- Select your domain and click Add Record.
- Set the Type to
SRV. - In the Name field, enter the service and protocol (e.g.,
_sip._tcp). - In the Value field, enter:
priority weight port target(e.g.,10 60 5060 sipserver.example.com.). - Click Save.
Common SRV Record Examples
Microsoft 365
_sip._tls → 100 1 443 sipdir.online.lync.com._sipfederationtls._tcp → 100 1 5061 sipfed.online.lync.com.
Minecraft Server
_minecraft._tcp → 0 5 25565 mc.yourdomain.com.
Troubleshooting
Verify your SRV record using the command: nslookup -type=SRV _service._protocol.yourdomain.com. Ensure the target hostname has a corresponding A record that resolves to the correct IP address.