Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

SRV records

Module 5: Other records · Reading time: 6 minutes

Learning objective: After this lesson, you can read an SRV record and fill in the fields correctly.

Key concepts: SRV, name structure _dienst._protocol, priority, weight, port, target

What is an SRV record for?

An A record tells you where a name lives. An MX record tells you where mail for a domain should go. But how does a program for telephony, chat or calendars know on which server and on which port the service for your domain runs? That's what the SRV record (from service) is for, described in RFC 2782.

You'll mainly come across SRV records with:

  • business telephony and chat (SIP, and older setups of Microsoft Teams and Skype for Business with _sip._tls and _sipfederationtls._tcp),
  • email programs that automatically look for settings (_imaps._tcp, _submission._tcp, _autodiscover._tcp),
  • calendar and contacts (_caldavs._tcp, _carddavs._tcp),
  • game servers such as Minecraft (_minecraft._tcp).

Usually you'll be given the exact values by the service. You don't have to work them out yourself, but you do need to copy them correctly.

What an SRV record looks like

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

The name consists of three parts:

PartMeaning
_sipthe service, always with an underscore in front of it
_tlsthe protocol: usually _tcp or _udp, sometimes _tls
example.com.your domain

The value consists of four parts, always in this order:

FieldExampleMeaning
Priority100Which server goes first. Just like with MX: the lowest number first.
Weight1Distribution between servers with the same priority. A higher weight gets proportionally more traffic.
Port443Which port the service runs on.
Targetsipdir.provider.example.The name of the server, with a dot at the end.

The target must be a name with its own A or AAAA record, not an IP address, and according to the standard, not a CNAME either. A target of just a dot (.) means: "this service is explicitly not available here".

Multiple servers

Just as with MX, you can create multiple SRV records for the same service:

_imaps._tcp.example.com.  3600 IN SRV  10 60 993 imap1.example.com.
_imaps._tcp.example.com.  3600 IN SRV  10 40 993 imap2.example.com.
_imaps._tcp.example.com.  3600 IN SRV  20  0 993 reserve.example.com.

Read this as: try the two servers with priority 10 first, with imap1 getting roughly 60% of connections and imap2 40%. If neither of those is reachable, try reserve.

How panels display the fields

The SRV record is the record where panels differ most from one another. Some panels have separate boxes for service, protocol, priority, weight, port and target. Others have one name field and one value field. Three things often go wrong:

  1. The domain name doubled up in the name. If you enter _sip._tls.example.com as the name while the panel adds your domain name after it itself, you end up with _sip._tls.example.com.example.com. In that case, enter only _sip._tls.
  2. Forgetting the underscores. sip.tls is an ordinary subdomain name and won't be found by any program.
  3. The fields in the wrong order in a value field. The order is always priority, weight, port, target.

After saving, always check with a lookup tool (lesson 8.2) whether the record is exactly under the right name.

In practice: what it looks like in a panel

As an example, we use the DNS screen of My WebOké, which has a help window for SRV records. In DirectAdmin, cPanel, Cloudflare and most registrars, you fill in the same six pieces of information, sometimes on a single line.

  1. Click Add Record and choose SRV.
  2. Enter the service (_sip) and choose the protocol (_tls).
  3. Enter the priority, weight and port as specified by the service.
  4. Enter the server name as the target, with a dot at the end.
  5. Save.

Summary

  • An SRV record tells you where, and on which port, a particular service for your domain runs.
  • The name is _dienst._protocol.domein, with underscores.
  • The value is always: priority, weight, port, target.
  • Lowest priority first; for equal priority, the weight distributes the traffic.
  • Copy the values from the service exactly, and check that the name hasn't been doubled up.

Quiz

1. What is the correct order of the value in an SRV record?



2. You have two SRV records: 10 0 993 a.example.com. and 20 0 993 b.example.com. Which server does a program try first?



3. A service asks for an SRV record for _sip._tls. Your panel automatically adds your domain name after it. What do you enter as the name?



4. What does an SRV record mean if its target is just a dot (.)?



Exercise

Exercise Z5.1: Looking up an SRV record. Gmail publishes an SRV record that lets mail programs find the IMAP server. Look up the SRV record for _imaps._tcp.gmail.com and fill in the port and the target.

Exercise Z5.1: Looking up SRV



We don't store what you enter or what we find live. Your browser remembers your answers and whether you've passed the exercise. If you're signed in, we only save that you got the exercise (almost) right in My courses; you can also delete that there.

Exercise O5.1: Setting it up yourself in your practice zone. In your practice zone, create two records:

  • an A record sip with the value 192.0.2.50 (the "server" for the service);
  • an SRV record for the service _sip, protocol _tls, with priority 100, weight 1, port 443 and target sip.<code>.dnspractice.eu. (your own practice zone, with the dot at the end).

In the practice zone, the SRV record points to a fake server in your own zone; for your real domain, you fill in the target that the real service specifies. Then click Check.

Exercise O5.1

You'll do this exercise in your own practice zone: a real DNS zone on WebOké's nameservers, just for you. Sign up with your email address. You'll get a login link by email and then come back to this lesson. We only use your address for the course.

Further reading

This article describes the steps in the WebOké panel; it works similarly in other panels.

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…