Skip to main content

Migration testing using the "hosts" File on Windows

Here you'll learn how to test website migrations using the local hosts file.

Updated over 2 months ago

1 - Navigate to the directory

Navigate to the "etc" directory on your computer. The corresponding path is shown below:

C:\Windows\System32\drivers\etc

2 - Open the file

Open the hosts file with any editor.

Note: You need admin rights to edit your hosts file!

3 - Enter IP and domain name

Now enter the desired target IP and the domain name to be tested.

Note: If you would like to test a migration to internex, you can obtain the required IP address from support at [email protected]

Then save the file.

4 - Open Command Prompt

Now open the Command Prompt to check the name resolution. You can access the Command Prompt by pressing the Windows key and searching for "cmd".

5 - Ping the domain

Now ping the domain entered in the hosts file as follows:

ping <domain>

Please replace <domain> in the command with the domain you entered.

In the screenshot, we used the domain 'example.com' as an example.

6 - Test in the browser

If the response comes from the correct IP address, open the browser.

Before doing so, clear the cache or open a private browser window.

Now enter your domain name in the browser's address bar.

The domain name's destination will now be redirected through the hosts file, and you will see the migrated page on your internex server.

Did this answer your question?