How to edit your host file on Windows
This is a quick step-by-step guide to editing your host file on Windows. Editing your host file is a great way of viewing a specific web server prior to updating your DNS, or whilst it is propagating.
If you are a Mac user, please see our Knowledge Base article 'How to edit your host file on macOS'.
How to edit a host file on Windows
Click on the 'Start' button
When running Windows, click on the start button (or the Windows icon), usually located at the bottom left of the screen.
Choose 'All Apps'
On the start menu, choose 'All Apps' from the list of options. Then click on the option labelled 'Windows Accessories'
After you have clicked on 'Windows Accessories', you will be presented with a list of applications. Locate 'Notepad' from the list of icons, and right click on it. Then choose 'Run as administrator' from the context menu.
At this point a dialog box may open, asking you 'Do you want to allow the following program to make changes to this computer'. Simply click 'Yes' to proceed.
Open the host file
In Notepad, click 'File', then 'Open'.
Locate your host file
From the window that opens, click on 'Text Documents (*.txt)' and choose 'All files'. Then locate and open the following file:
Edit the host file
This will open your host file. To add a new server or domain, move the cursor to the bottom of the file, then enter the IP address of your server, press the 'Tab' key, then enter your domain name.
The following is an example, you will need to update these to your relevant IP address and URL.
When you have entered the relevant IP address and url, click 'File', then 'Save' to save your changes.
Then open your web browser and enter the domain you added to your host file. If the site changes from the one of the public can see, to the one on your new server, then you have edited the host file successfully.