Evolve Help Center
Evolve Web Hosting Homepage Evolve Web Hosting Portal Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Published on: 03/17/2023 | Updated on: 03/17/2023 | Reading Time: 2 minutes

Test Your Website After Data Transfer

Anytime your website is moved from one server to another, it’s a great idea to test the site prior to updating your Nameservers or DNS to make sure the migration went as planned. This article will walk you through the steps to test this for Windows and Mac users.

The recommended method to test websites before changing DNS for a domain is to edit the local hosts file on your computer. This will bypass the DNS lookup from your computer to that domain – which allows your computer to preview your website as it is on the new server without making any changes to your live website.

Windows Users

  1. Locate the HOSTS file on your computers. Typically it is in one of the following locations:
  • Windows NT/2000/XP/2003/Vista/7/8/10/11 C:\windows\System32\Drivers\etc\hosts

  • Windows 95/98/ME - C:\windows\hosts

  1. Open this file using your favorite code editing program. (Right-click on Notepad and select the option to Run as Administrator - otherwise you may not be able to open or edit this file.)

  2. Next, open the file. We suggest you Save As so you have an original copy of the file that you can restore later. You will see two columns of information, the first containing IP addresses and the second containing host names. By default, a windows hosts file should be similar to the following (after the lines of comments): 127.0.0.1 localhost

  3. You can add additional lines to this file that will point requests for a particular domain to your new server’s IP address. Example:

127.0.0.1 localhost
67.222.1.2 example.com
67.222.1.2 www.example.com
  1. Save your changes

  2. Restart any currently open browsers. You may also want to flush your DNS cache. In most versions of Windows, you can do this by running the following command from within the command prompt:
    ipconfig /flushdns

  3. Visit the migrated version of your website by visiting http://www.example.com or http://www.example.com in your browser window.


Mac Users

  1. Open Terminal

  2. Use the nano application, with sudo, to modify the /etc/hosts file. (You will be prompted for your password for sudo access.)
    sudo nano /etc/hosts

  3. You can add additional lines to this file that will point requests for a particular domain to your new server’s IP address. Example:

127.0.0.1 localhost
67.222.1.2 example.com
67.222.1.2 www.example.com
  1. Once you make your changes, type CTRL + X to save the file

  2. Press y on your keyboard to confirm the overwrite

  3. Press the Enter Key

  4. One last step to clear your cache and make the new settings take place. Run the following command while still in terminal:
    dscacheutil -flushcache