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