Browse a website with hosts file

During server migration or transfer, you might want to test your websites in new server to ensure everything working properly before update your domain's name servers. To do that, please follow these steps:

1. Edit hosts file "C:\Windows\System32\drivers\etc\hosts" in your PC.

2. Add following 2 lines to last line of the hosts file:

NEW_WEBSITE_IP    yourdomain.com
NEW_WEBSITE_IP    www.yourdomain.com

*Replace NEW_WEBSITE_IP to website IP in new server, and yourdomain.com to your actual domain name.

3. Save it and then browse http://www.yourdomain.com or http://yourdomain.com in web browser, you should now see contents hosted in new server.

If your web browser still show you contents in old server, please clear your web browser cache or restart your PC. Remember to remove the added lines after complete your test.

  • 119 Users Found This Useful
Was this answer helpful?

Related Articles

SolidCP & MSPControl: Point domain aliases

Please follow the steps below to point your domain aliases to an existing domain.1. Log in to...

SolidCP & MSPControl: Set website default first page

The default page is the first page that will be display when a user visit your website.Please...

SolidCP & MSPControl: Redirect URL

Redirect URL will redirect your website to the destination URL.Please follow the steps below to...

PHP Fatal error: Cannot redeclare quoted_printable_encode()

When encounter the following PHP error:PHP Fatal error:  Cannot redeclare...

SolidCP & MSPControl: Enable HTTPS for Windows hosting

HTTPS protocol is a standard security technology used to establish an encrypted link between a...