Clear DNS cache in OSX (Mac)

Type the following command into terminal.

dscacheutil -flushcache