Edit the hosts 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!

[custom_alert type=”primary”]Revert any and all changes after testing, it is very common for hosts file changes to be forgotten about. Causing connection type issues in the future.[/custom_alert]

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 the file then open.

5. From here, open the hosts file by typing the following in the File name: field.

[custom_code_block id=”copy-path”]c:\windows\system32\drivers\etc\hosts[/custom_code_block].

6. Finally, click open to start editing the hosts file.

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 the text below.

[custom_code_block id=”copy-path-2″]notepad c:\windows\system32\drivers\etc\hosts[/custom_code_block].

3. Please check that it is running at the administrator level and click OK.

4. Finally, start editing your hosts file.

[custom_alert type=”warning”]For Windows based systems, it’s important that changes are made at the administrator level. If you experience issues, it’s possible a stage has been performed incorrectly. If you require assistance, please contact our support team who are happy to help.[/custom_alert]


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:.

[custom_code_block id=”copy-cmd-1″]sudo vim /etc/hosts[/custom_code_block].

3. To enter the file just hit enter.