How do I edit my host file?

The most common reason to edit the host file is to test a website before changing the ‘live DNS’ to complete a migration.  To do this, you should add lines as shown below:

x.x.x.x mydomain.com

x.x.x.x www.mydomain.com

Replace ‘x.x.x.x’ the IP address of your service with ourselves, and mydomain.com with the domain for which you wish to override the ‘live DNS’.

Remember to remove these lines once you have completed the testing and migrated!

Edit Host file For Windows 8, 8.1, 10

  1. Firstly, from your desktop, open the start menu.
  2. Using the searching feature, type Notepad.
  3. With the Notepad icon visible, right click Notepad and select run as administrator.
  4. You’re now running Notepad as administrator, click file then open.
  5. From here, attempt to open the hosts file by typing : c:\windows\system32\drivers\etc\hosts in the “File name:” field.
  6. Finally, click open to start editing the hosts file.

For Windows 7

Fortunately, the number of steps is reduced due to how this operating system works. However, please ensure that the application is run as administrator.

  1. Firstly, from the desktop area press the Windows Key + R key simultaneously. This opens a run window.
  2. Inside the run window, enter: notepad c:\windows\system32\drivers\etc\hosts
  3. Please check that it is running at administrator level and click Ok.
  4. Finally, start editing your hosts file

For MacOS

Opening the host file is even simpler for macOS users, follow these steps to edit hosts.

  1. Open a Terminal window on your device. 
  2. From the terminal window, type the following command: sudo vim /etc/hosts
  3. To enter the file just hit enter.