The hosts file is a text file that maps hostnames to IP addresses. On browser request, the system first checks if there is an entry in the hosts file, if exists gets the corresponding IP address. If no it resolves the IP via the active connection’s DNS servers.
The hosts file can be edited to block certain hostsnames, like Adobe's licence hosts, or used for web development purposes, i.e. to redirect domains to local addresses.
###Steps – Open the Terminal.app
Either start typing Terminal in the Spotlight search, or goto
Applications > Utilities > Terminal
type either of the commands below and enter your password
$ sudo nano /etc/hosts # This is just a symlink
$ sudo nano /private/etc/hosts
Move around with your arrow keys on the keyboard. Edit as you wish After editing, to SAVE and QUIT:
CTRL+O #ctrl plus Ohh,
then ENTER
then CTRL+X
===DISCLAIMER===
With great power comes great responsibility. Be careful.