Search code examples
webrtcnatstunturn

Can we use a different subdomain than 'stun'/'turn' for a STUN / TURN Server?


All the documentation / tutorials for setting up a STUN / TURN server suggest that we need to create two subdomains namely:

  • stun.yourdomain.com
  • turn.yourdomain.com

And then these can be accessed as:

  • stun:stun.yourdomain.com:5349
  • turn:turn.yourdomain.com:3478

Is it possible to register subdomains with different names than "stun" and "turn" ? Has anyone tried / created subdomains as:

  • stun:somothername.yourdomain.com:5349 ?

Is there any official documentation / reference that can be used to understand this in more detail?

Thanks in advance!


Solution

  • If I understand RFC 5389 correctly, there is no requirement to use specific domain names, on the contrary:

    Hard-coding the domain name of the server into software is NOT RECOMMENDED in case the domain name is lost or needs to change for legal or other reasons.

    (from section 9)

    As long as you follow the advice in that section for DNS Discovery, you should be able to use any domain/host name you like.