Sometimes you need to start working on a Web Development project where domain is not final or setup yet. If you have the cPanel ready you can run it on your computer.

All you need to do is change your computer’s “Hosts” file. Here is how you will do it on a Mac.

Open up your Terminal window and type in this line:

sudo nano /etc/hosts PRESS ENTER
Enter your admin password and PRESS ENTER

Now, you will see Nano text editor where you have to write a single line of text to make this happen. Let’s see how:

Move the blinking cursor by using your keyboard’s down arrow key.
Go after the last line and start typing:
make sure you replace the IP from your cPanel IP and the domain is whatever you want to use.

Then save it by pressing CTRL+O together
Then exit out by pressing CTRL+X together

That’s all. Now try browsing the domain you specified in the hosts file and start your work. By the way, you can do the same thing on windows computers by accessing Windows > System32 > Drivers > etc > hosts

Good day.