Yes, this is possible!
The easiest solution is using an SRV record. SRV records are spiced-up CNAME records. They return not only the domain with the correct A (or AAAA) record but also the port.
So assuming you have the domain meinedomain.de
with an A record pointing to the IP 1.2.3.4
where the TeamSpeak server can be reached on port 9999
.
You can then simply add the SRV record _ts3._udp.meinedomain.de
with the target domain set to meinedomain.de
and the target port set to 9999
. This will allow users to connect using meinedomain.de
and the port specified.
For ts.meinedomain.de
you can do the same but name the SRV record _ts3._udp.ts.meinedomain.de
. The target domain can either be meinedomain.de
or ts.meinedomain.de
.
There are also a lot of tutorials specifically for TeamSpeak SRV records, specifically for your domain’s DNS provider.
Also, check this out:
Alternatively not exactly what you are asking for, but you can also use the TeamSpeak server nickname feature. To quote myself: