Local Machine DNS Control For Better Testing

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:\Windows\System32\drivers\etc\hosts). 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. ;)

  1. carnotaurus reblogged this from alanfeekery and added:
    Ensuring you have...in an IIS host header...running, this...
  2. alanfeekery posted this
blog comments powered by Disqus