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: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. 😉


Published by

Alan Feekery

Developer, Gamer, Musician, Cyclist and big Motorsport fan... enjoys the odd cup of coffee :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s