Suppose we have a DNS entry ocean.corp.tld internally pointing to an internal IP address on our corporate network, and externally pointing to an external public IP address. Essentially same DNS name but two different IP addresses based on whether you are on our corporate network or outside of our corporate network.
If I open up https://ocean.corp.tld while connected to our corporate network, the name will be resolved to an internal IP address and it will be cached on the local machine DNS cache. Now if I try to connect to https://ocean.corp.tld from a external network from the same machine (no VPN) will it fail trying to use the cached IP address from the local machine DNS cache, or will it resolve to the external public IP address and connect successfully?