Because why not?
I mean it’s totally okay to go to http://192.168.33.10 but why not make it http://mijimo.local or http://www.mijimo.dev
To do that, we need to edit our hosts file on our Mac.
It’s a pretty easy and straightforward task. Here’s how to do it.
Editing your hosts file on a Mac
Open your Mac’s Terminal (by the way, if you’re into trying something new I suggest iTerm2)
Edit your hosts file. It’s located at /private/etc/hosts
In your Terminal window enter the command below
sudo nano /private/etc/hosts
sudo lets you act as the root user, so you’ll be asked to enter root account’s password. Next, nano is a text editor working in your Terminal window, that’s the program we use to edit our hosts file.
Add the following line to the end of the file (also modify according to your likes)
192.168.33.10 mijimo.local www.mijimo.com
This tells your Mac to directly go to the given IP address without hesitation, when you enter the URL http://mijimo.local or http://www.mijimo.local
Press Control-x, you’ll be prompted to save the changes and exit.
In some cases, you may need to flush your Mac’s DNS cache.
To accomplish this you need to enter the code below:
sudo dscacheutil -flushcache
And you’re good to go.