I am having an issue connecting to my website. When I ping
sample.com the server, I IP address I get is
192.168.0.12, but when I do an
NSlookup, I get the correct IP. When I switch user account or go to the recovery mode, the name of site is resolved correctly and I can get to it.
Note that I am trying to access my website from the outside world, not from the local network.
dscacheutil -q host -a name sample.com
and I got:
name: sample.com ip_address: 192.168.0.12
To solve the issue I tried deleting the preferences from the library and resetting the NVRAM:
sudo dscacheutil -flushcache sudo killall -INFO mDNSResponder launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
But the name is still resolving wrong. I am running macOS High Sierra 10.13.2.