Evolve Web Hosting Help
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: 02/13/2025 | Reading Time: 3 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:

To find your macOS version, click the Apple icon in the upper left corner of your screen and then click About this Mac

For macOS 15 (Sequoia), macOS 14 (Sonoma), macOS 13 (Ventura), macOS 12 (Monterey), macOS 11 (Big Sur) and macOS 10.15 (Catalina)

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

If your operating system is MacOS Mojave or earlier, use the appropriate command listed below

macOS 10.14 (Mojave), macOS 10.13 (High Sierra), macOS 10.12 (Sierra), OS X 10.11 (El Capitan) sudo killall -HUP mDNSResponder

OS X 10.10 (Yosemite) sudo discoveryutil udnsflushcaches

OS X 10.9 (Mavericks), OS X 10.8 (Mountain Lion), Mac OS X 10.7 (Lion) sudo killall -HUP mDNSResponder

Mac OS X 10.6 (Snow Leopard) sudo dscacheutil -flushcache

Mac OS X 10.5 (Leopard) sudo lookupd -flushcache

Mac OS X 10.4 (Tiger) lookupd -flushcache