Skip to content

Add an SRV record

View as Markdown

An SRV record tells clients of a service which server runs it and on which port. Phone systems that use SIP, chat servers that use XMPP, and some directory and mail clients look up an SRV record before they connect. The service’s documentation tells you the name and values it expects.

  • The domain is on Manage DNS. See Add a domain.
  • The server that runs the service has a name with an A or AAAA record, such as sip.example.com. See Add a DNS record.
  • You know the service name, the protocol, and the port, such as SIP over TCP on port 5060.
  1. On Manage DNS, in the domain’s row, click Actions, then Manage.

  2. Click Add Record, and under Select Record Type, choose SRV.

  3. In Name, enter the service and the protocol, each with an underscore in front, separated by a dot. For SIP over TCP, enter:

    _sip._tcp

    Your domain is added to the name once, so this record is for SIP over TCP on example.com. A name that ends in a dot is used as written.

  4. In Target, enter the full host name of the server, such as sip.example.com. MyAccount adds the dot at the end.

  5. In Priority, Weight, and Port, enter numbers from zero to 65535:

    • Priority: lower is tried first. With one server, enter 10.
    • Weight: shares traffic between servers of the same priority. With one server, enter 0.
    • Port: the port the service listens on, such as 5060.
  6. Click Submit.

The record appears in the list, with Domain Record has been created successfully.

A name can have one SRV record. A second SRV record with the same Name is refused; to change the server or port, edit the record you have.

A new SRV record has no TTL field. It gets 14400 seconds, which is four hours. To change it, open the record’s Actions menu, click Edit, and change the TTL. See Edit a DNS record.

E2E’s nameservers answer with the record at once:

dig @ns50.e2enetworks.net.in _sip._tcp.example.com SRV +short

The output is the priority, weight, port, and target, in that order:

10 0 5060 sip.example.com.

Clients of the service can now find its server by your domain’s name. For help with any message, see Troubleshooting DNS.