Point Domain to Another IP Without Changing DNS Name Servers
Saturday, February 28th, 2009 | Author:

One can point your site to any designated IP address you want without changing the Name server of your Domain. Yes, you will be able to view/test your site on new server without changing the name servers as well as having trouble of using site Preview options in Control panel like Plesk. This option is also helpful in the case of some site that use .js script in their codes since those scripts don’t work in Plesk site preview option. Specially in case of sites that work on DotNetNuke [DNN].

So here we go:

On your local machine, [AND NOT THE SERVER]:
Goto START >> Run >> and Type:
notepad "C:WINDOWSsystem32driversetchosts"
And hit Enter

If you get file does not exist error then create hosts file in notepad “C:WINDOWSsystem32driversetc” folder.

At the end of the file you will have:

127.0.0.1 localhost

Just add your domain with the IP you want to point to, and it will look like, this will be also applicable if you have create a new hosts file:

127.0.0.1 localhost
192.168.1.52 mywebhostingblog.net
192.168.1.52 www.mywebhostingblog.net

Save the file and exit.

Now ping the domain on the computer you have made changes on and it will point to the IP address defined. You can now browse your site without the site preview and you will have to the content of the server you are moving to. Just remove the entries from the hosts file to point your domain back it was.

Wasn’t that Simple..!!!