How to connect my domain to TS3?

Good afternoon! I’m pretty new to this topic. I have raised the teamspeak server on windows 10. Everything works, I bought a domain, set up a DNS. The server is now running under an alias. But inside the network, it only works with the IP address, and the domain does not work. For example, I’m in a computer club, it comes with a domain, and if I’m at home, it doesn’t work. It only works with an IP address. How to solve it. The server does not work on its own grid with the domain.