Steps to Access Your React Project via a Custom Domain
-
Edit Your /etc/hosts File:
- Open Terminal and run:
sudo nano /etc/hosts
- Add the following line to the end of the file:
127.0.0.1 local.yoursite.com
- Save and exit the editor (in nano, you can do this by pressing
CTRL + X, then Y, and Enter).
- After adding, your
/etc/hosts file should look like this:
# Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ##
127.0.0.1 localhost
127.0.0.1 local.yoursite.com
255.255.255.255 broadcasthost
::1 localhost