An SRV (Service) record points a specific service, like VoIP calling, instant messaging, or a directory service, to the correct server and port on your domain. Unlike an A or CNAME record, which just points a hostname to an address, an SRV record also tells the requesting software which port to connect on and gives you a way to set priority and load balancing between multiple servers.
You'll usually only need to add one if a service provider (a VoIP/SIP phone system, Microsoft Teams, an XMPP chat server, or similar) gives you specific SRV record details to add to your domain's DNS.
What the SRV record fields mean
When you add an SRV record, you'll be asked to fill in several fields rather than just a name and a value:
- Service: the name of the service, written with a leading underscore, e.g. _sip or _xmpp-client.
- Protocol: usually _tcp or _udp.
- Name: the domain or subdomain the record applies to.
- Priority: a lower number means the server is tried first when there are multiple targets.
- Weight: used to split traffic between servers that share the same priority. Higher weight gets more of the load.
- Port: the TCP or UDP port the service listens on.
- Target: the hostname of the server that actually runs the service.
Always get the exact Service, Protocol, Priority, Weight, Port, and Target values from the provider of the service you're connecting. Guessing these values, or getting the port wrong, means the service simply won't be found.
In cPanel
- Log in to cPanel.
- Under the Domains section, click Zone Editor.
- Find the domain you want to edit and click Manage.
- Click Add Record and choose Add SRV Record.
- Enter the Name, Priority, Weight, Port, and Target exactly as given by your service provider, then choose the correct Service and Protocol.
- Click Add Record to save it.
In DirectAdmin
- Log in to DirectAdmin.
- Go to DNS Management.
- Select the domain you want to edit.
- Under Add a New Record, choose SRV as the record type.
- Fill in the Name (service and protocol, e.g. _sip._tcp), Priority, Weight, Port, and Value/Target as supplied by your provider.
- Click Add to save the record.
How long it takes to work
Like any DNS change, a new SRV record needs time to propagate before the service can find it everywhere. This is usually quick, but can take longer depending on your record's TTL and how quickly other DNS resolvers refresh their cache.
If you're not sure how to add or edit any other type of DNS record for your domain, see How to Add or Edit a DNS Record (A, CNAME, MX, TXT).