Using a Server's hosts File Through SSH SOCKS
Follow the destination name to the machine that resolves it when an SSH SOCKS route should reach a private alias.
An alias defined only on the SSH server can work through its dynamic SOCKS forward if the application sends the destination name. If it resolves locally first and sends a numeric address, the server's hosts mapping never gets the original name to resolve.
Ordinary OpenSSH dynamic forwarding carries a domain destination to the server side for the outward connection. OpenSSH uses the system address lookup API there. On a typical glibc Linux host, NSS controls the hosts database and lookup order, so a hosts-file entry can participate. It is not a DNS record copied to the laptop.
Keep the intended name, such as preview.internal, in the website URL and select the client's remote-hostname SOCKS mode. Replacing the URL hostname with an IP can change both HTTP Host and TLS identity; reachability does not make a certificate valid for another name.
If the alias still fails, identify the environment doing the remote lookup. A container, chroot or separate service instance may not use the hosts file you edited. Other SOCKS implementations can use their own resolvers, so this system-lookup behavior should not be assumed for every proxy server.