i can connect to my vpn but cannot resolve hostname

I can ping my server and access share drives via their IP over vpn however when i use the server name it says the server is unavailable

Are you using private IP addresses or public ones of those devices when you are connected via VPN? Do you adjust the DNS server addresses on the client device when you connect to VPN?