When setting up a new website or web application it is advisable to make sure your new creation is working properly on the server it will live on remotely.
This is made easy by simply setting up your server but not creating the public DNS entry for the website and only setting the DNS settings up on your own PC so you can test away.
This is done by editing the hosts file (C:WindowsSystem32driversetchosts). This file has no extension.
Simply open it up in a text editor and type in your to be DNS settings at the bottom of it.
123.456.21.978 mywebsite.com 123.456.21.978 www.mywebsite.com
All your browsers should access your website now on your server no issue both with and without www. Just make sure you 301 towards a non www or www site before you go live, that’s an seo duplicate content issue. 😉