setup localhost domain name mac code example Example: adding local domain name mac <command to open up your text editor> /etc/hosts