Hi,
Thanks for posting in Q&A platform.
As Crypt32's answer, the nslookup command does NOT use hosts file but DNS.
If you remove the DNS, you could use ping instead and it will return the IP provided in your hosts file.
If you want to run nslookup command to resolved the IP address, please setup the ip for this domain in a real DNS Server.
Best Regards,
Sunny
----------
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.