I have a service running on port xxxxx. I want to access that service through a subdomain (myspecialservice.mydomain.com). I know I need to create an SRV record that looks like _Service._Proto.myspecialservice TTL Class SRV Priority Weight xxxxx Target.

My question is, do I also need to add a CNAME or A/AAAA record for this subdomain? Or is the SRV record sufficient?

To be clear, my question is not about the target address.

  • What type of client(s) are using this service? (Does everything support SRV?) Mar 31, 2020 at 15:02
  • 1
    The client programs are SRV aware. it's not a web browser or anything like that. I know those don't work with SRV (and aren't supposed to).
    – krizboy12
    Mar 31, 2020 at 15:12

2 Answers 2


Yes, you still need an A or CBAME (or Alias pseudo record).

The typical IP stack wont resolve an IP address from an SRV record (much like you still need ab A or CNAME when specifying an SMTP server for mail despite the existence of an MX record)

  • This assumes that not all client software is SRV-aware, as I understand it? Mar 31, 2020 at 16:54
  • 2
    No. From the question it can be assumed that the client understands SRV - otherwise there is no sense to the question at all. But even then, SRV defines that there is no IP there, but a name.that SRV points TO.
    – TomTom
    Mar 31, 2020 at 17:00
  • @TomTom The question also makes it clear that it's not asking about the target, so I guess that just makes this answer incorrect? Mar 31, 2020 at 17:11
  • @davidgo If this is indeed meant to be about the SRV target, maybe phrase it as some "No, however the target name still needs an address record" deal, to match the question? Mar 31, 2020 at 17:51
  • @tomtom the question says "I want to access that service through a subdomain (myspecialservice.mydomain.com)" which says theprogram is not relying on the SRV record for the lookup, otherwise the subdomain would not be necessary.
    – davidgo
    Mar 31, 2020 at 19:34

It's unclear which subdomain you mean, so let's take an example with two servers providing a mysterious service on TCP port 12765 with the same priority but a bit different weight.

_service._tcp.special.example.com. IN SRV 0 5 12765 provider1.example.com.
_service._tcp.special.example.com. IN SRV 0 7 12765 provider2.example.com.


  • You don't need an A record for:

    • _service._tcp.special.example.com.
    • _tcp.special.example.com.
    • special.example.com.
  • You need A records for:

    • provider1.example.com.
    • provider2.example.com.

(Avoid using CNAME records for simplicity & until you have strong knowledge on how DNS works.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.