This problem is plaguing our users and driving management crazy. We have users that are onsite that need to share file locations for files that are on a local server as links in email to other users. They do so by right clicking on the file, clicking get info, and selecting the path from the "Where" section of the file properties.
Some of those users may be connected to the network via VPN, so the afp://appleserver01._afpovertcp._tcp.local in the link doesn't work for them.
We have found that if we manually map a drive using "Connect to Server" or Command+K procedure, using the following:
afp://servername.domain.tld/mountpoint results in afp://servername.domain.tld/mountpoint/filename.txt when we select a file and right click, get info, in the Where section.
afp://ipaddress/mountpoint results in afp://ipaddress/mountpoint/filename.txt when we select a file and right click, get info, in the Where section.
Both of these options are clickable as email links for on-premise users and VPN connected users.
The problem is that if a user opens Finder and clicks on the server name directly without going through the "Connect to Server" or Command+K method, then the "Where" location in file properties when clicking get info is almost always something like afp://appleserver01._afpovertcp._tcp.local/mountpoint/filename.txt, which doesn't actually work for some users including VPN connected users.
How can we force the "Where" location to always be afp://hostname.domain.tld/ always instead of afp://appleserver01._afpovertcp._tcp.local/ when a user clicks on the server in Finder?
What causes this inconsistent behavior?
Edit: This is for Mac OS X 10.11.6 & 10.12.6 (not tested on High Sierra yet).
We are only concerned with files that are stored on a shared resource (server).