In general, editing the Hosts file is a bad solution. I only use it for temporary testing, and always remove any hosts file entry a few minutes after adding it.
You should be using a DNS server of some kind to setup your custom domain, perhaps this is possible with your wifi router, or else you can set up any mac as a DNS server.
As a nice side benefit, having your DNS server on the LAN will make your internet noticeably faster. Most people are using their router as a DNS server and they really are not fast enough to implement DNS properly. It's a good idea to use a fast remote DNS server (which one is best will depend on what city you live in), but having one on your LAN is even better.
You can google for instructions how to setup
bind on any mac, it's free. Or you can purchase Lion Server from Apple in the App Store, and download Server Admin Tools to configure bind with a nice GUI (with Lion, unlike Snow Leopard, you have to download Server Admin Tools separately form buying a license for Mac OS X Server. Basically they've separated the advanced server tools out into a separate download from the basic ones).