HyberHost Knowledge Base

Find our Guides & Fixes to Problems

< All Topics

Howto Set a Static Host Entry


When considering a website migration to a new server, it’s crucial to ensure that the website loads correctly and as expected before implementing DNS changes that redirect visitors to the new site. One way to achieve this is by tricking your computer or device into forcefully loading the website from a specific IP address. In the following sections, you will find instructions on how to modify your host files for both Windows and OS X.

It’s important to keep in mind that performing this task will prevent your PC from accessing the live server of your domain. Consequently, you may experience issues sending or receiving emails from that domain until the line is removed from your hosts file after verifying the website.


  1. To begin, you’ll need to open Notepad as Administrator. You can do this by typing “Notepad” into the Start Menu, right-clicking on it, and selecting “Run as Administrator”.
  2. Once Notepad is open, navigate to the hosts file on your PC. Go to File -> Open -> C:\Windows\System32\drivers\etc. Make sure to select “All Files” at the bottom right corner to display files that are not in .txt format. Open the “hosts” file, which should resemble the following:
  1. At the bottom of the file, add a new line that includes the IP address of your new server and the domain name you want to visit. For example, you can add the following line:      hyberhost.com
  1. Finally, save the file and close Notepad.

Testing the Changes

After making the necessary modifications to the hosts file, you can now proceed to test whether the website is loading correctly with the new IP address. To verify this, you can perform a ping command in the command prompt or terminal. Follow the steps below:

  1. Open the command prompt or terminal on your computer.
  2. Type the following command and press Enter:
ping hyberhost.com
  1. The command prompt or terminal will display the ping results, and you should see the new IP address that you entered into your hosts file. It will look similar to the following:
Pinging hyberhost.com [] with 32 bytes of data:
Reply from bytes=32 time=3ms TTL=61

Note: It’s important to keep in mind that some web browsers cache DNS lookups, which means they may store previous results until fully closed. To ensure an accurate test, it is recommended to visit the website using a new Incognito window or private browsing mode in your preferred browser.

Leave a Reply

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

Table of Contents