How do I edit my hosts file?
The most common reason to edit the hosts 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:
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!
Important please 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.
Edit Hosts file For Windows 8, 8.1, 10
- Firstly, from your desktop open the start menu.
- Using the searching feature, type Notepad.
- With the Notepad application icon visible, right click Notepad and select run as administrator.
- You’re now running Notepad as administrator, click file then open.
- From here, attempt to open the hosts file by typing : c:\windows\system32\drivers\etc\hosts in the “File name:” field.
- 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 ran as administrator.
- Firstly, from the desktop area press the Windows Key + R key simultaneously. This opens a run window.
- Inside the run window, enter:
- Please check that it is running at administrator level and click Ok.
- Finally, start editing your hosts file
For Windows based systems its important that changes are made at the administrator level. If you experience issues, its possible a stage has been performed incorrectly. If you require assistance please contact our support team who are happy to help
Opening the hosts file is even simpler for MacOS users, follow these steps to edit hosts.
- Open a Terminal window on your device.
- From the terminal window, type the following command: sudo vim /etc/hosts
- To enter the file just hit enter.