I've developed a small site for an academic project, and I'd like to have it being shown as a live site, with its own domain name.
For example: I want to enter the domain name JustAnExample.com, but it should access the localhost.
I've tried to change the Hosts file, but it didn't work.
Changing the Hosts file should work!
adding > 127.0.0.1 justanexample.com <
will redirect it to localhost.
this may help! Editing local host file