To set up a new blog on a new webhost while the domain name still points to another website on another webhost, I needed to edit the host file on my Windows 10 desktop and Linux laptop. This allows me to view the new website online.
The hosts file is a computer file used by an operating system to map hostnames to IP addresses. The hosts file is a plain text file, and is conventionally named hosts. Originally, a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for the ARPANET membership, containing the hostnames and address of hosts as contributed for inclusion by member organizations. https://en.wikipedia.org/wiki/Hosts_(file)
The hosts file needs to be edited as administrator:
- On Windows click on the start menu
- Type notepad
- Right-click on the notepad icon, click Run as administrator
- Click Yes
- Then Open… C:\Windows\System32\drivers\etc\hosts
- On Linux to use administrative rights to save changes to the hosts file edit it using terminal commands.
- For example sudo xed /etc/hosts , xed being the Linux Mint built in text editor .
- You have to use the terminal so you can launch the appropriate application with administrative rights.
- Once you’re done editing the file, hit Ctrl + X, and then y to confirm overwriting the changes.