Preview Website Before Name Server Change

When migrating web site to new server, it is good to test the site from new server before you actually change the name servers. Doing this will avoid unexpected errors after you make site live from new server.

To do this, you need to edit file with name hosts on your computer. Add following content to it.

Example

At this point, if you take command promt on you computer and type folloing command, you will see the new server IP.

Now you may need to restart the browser for browser DNS cache to clear. Now you will be able to see the site from new server.

Location of hosts file

Location of hosts file depends on Operating System you use.

Windows

You need to edit the file c:\Windows\System32\Drivers\etc\hosts

To open, you need Administrator privilage, so run notepad as user “Administrator”, then open above file to edit it.

Linux and Mac

The file is located in /etc/hosts, to edit use

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *