I’m having an issue removing some local DNS settings on my Mac that’s running Mac OS X 10.10.2 (Yosemite).
I normally use the
/etc/hosts file to direct requests from development sites to my guest Vagrant VM. Sometimes I use the live site’s URL in development to eliminate having to replace paths when I migrate my DB.
In this instance I had the following record:
192.168.50.4 example.com www.example.com
The above IP is my Vagrant VM’s IP.
I’ve migrated the site to production and I cannot get Chrome to connect to the live site on my server. When I use
traceroute that hostname, the Mac still resolves to the
192.168.50.4 Vagrant VM address that I have already removed.
When I visit the website on my mobile phone I’m getting the expected behavior.
So far I’ve done the following:
- Removed the record from my
- Rebooted my Macintosh.
- Cleaned the local cache as described here.
- Flushed Chrome’s DNS cache by visiting here:
- Rebooted my Macintosh again.
- Reloaded and re-provisioned my Vagrant VM.
I can’t seem to make my Macintosh connect to live site on the web. I’ve used this process for the last 10-15 projects I’ve developed.
Any ideas on how I might prevent my machine from looking up the domain on my Vagrant VM?
dscacheutil -q hostreveals the following entries:
name: example.net alias: # VAGRANT: 53475745d1ed12f00441552188bfdd8b (default) / 0eb4854a-a516-4d34-ac43-397240944175 ip_address: 192.168.50.4 name: www.example.net alias: # VAGRANT: 53475745d1ed12f00441552188bfdd8b (default) / 0eb4854a-a516-4d34-ac43-397240944175 ip_address: 192.168.50.4
Still not sure why I can't clear this using any of the commands recommended by Apple.