Tag Archives: dscacheutil

Edit hosts on a Mac OS X

Hosts files are located at /private/etc/.

Edit and add our new host configuration/ip.

sudo nano /private/etc/hosts


sudo nano /etc/hosts

Flush DNS cache

sudo dscacheutil -flushcache

This way we can have www.domain.com on a server for regular users and set up our own www.domain.com pointing to another server while we set up, for example, the migration.