Handy instructions for clients who wish to see a website on the actual domain.
For some of the sites we work on it makes sense to develop the site on the intended launch domain name. For these situations we provide instructions to clients about how to modify their “local hosts file” to view the site prior to it being live for the whole world.
If you are using a PC or Mac the process is pretty simple although it does require some command line access (gasp!). It can be intimidating to use a non-GUI interface, but if you closely follow the simple steps below, you will be all set in no time.
- Start by opening the terminal program (which you can find using OSX search).
- Type “sudo nano /private/etc/hosts”.
- Enter computer password.
- Enter IP / domain name line.
- Exit and save file (control+x, and then “y” to save).
- Flush local DNS cache with “sudo dscacheutil -flushcache”.
- View development site by typing in URL (using a Chrome incognito window is best).
Please be careful with these steps as you can really mess with your DNS settings on your computer, but if you follow closely you will be able to view your development site easily.