/etc/hosts to manage your local domains and didn't yet hear about more effective way of managing local domains, you should definitely try the old and good dnsmasq program to improve your development workflow.
apt-get manager we will install core program.
sudo apt-get install dnsmasqsudoloc domain as our local domain (I don't use .dev anymore, due to now it's into standard global domains) and then in /etc/dnsmasq.conf we add:listen-address=127.0.0.1
address=/loc/127.0.0.1sudo service dnsmasq restart$ ping example.loc
PING example.loc (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.010 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.016 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.036 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.038 ms