Here we explain how to create a hosts file modification on your device. Modifying the hosts file will allow you to view site on the Web Hosting Hub server without needing to point DNS to the server.
You will need to upload the site files via FTP or File Manager to the document root of the domain. Then, using a hosts file modification on the local PC, you can view the site as it would appear on the Web Hosting Hub server without modifying DNS records. Only the device that has the hosts file modification will see the site on the Web Hosting Hub server, all other devices will still be viewing the site on the server determined by DNS records.
Modify hosts File
- Make sure that site files have been uploaded via FTP client or File Manager to the proper document root
- Perform a hosts File Modification
- If using Windows run Notepad as administrator
- Open the file named hosts which is typically found in c:\windows\system32\drivers\etc
- Windows 95/98/Me c:\windows
- Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc
- Windows XP Home/Vista/Windows 7 c:\windows\system32\drivers\etc
- Windows 8 c:\windows\system32\drivers\etc
- Windows 10 c:\windows\system32\drivers\etc
- Windows 11 c:\windows\system32\drivers\etc
- Add the correct IP address and domain names to the bottom and save:
SERVER_IP_ADDRESS domain.com
REPLACE: Use the actual server IP address in place of 'SERVER_IP_ADDRESS' and use the actual domain name instead of 'domain.com' and 'www.domain.com'.
SERVER_IP_ADDRESS www.domain.com
- Add the correct IP address and domain names to the bottom and save:
- If using a MAC, open terminal (Applications > Utilities > Terminal)
- Open the hosts file with:
sudo nano /private/etc/hosts
- Or with new Macs:
nano /etc/hosts
- Enter the correct IP address and domain names to bottom and save:
SERVER_IP_ADDRESS domain.com SERVER_IP_ADDRESS www.domain.com
REPLACE: Use the actual server IP address in place of 'SERVER_IP_ADDRESS' and use the actual domain name instead of 'domain.com' and 'www.domain.com'.
- Enter the correct IP address and domain names to bottom and save:
- Open the hosts file with:
- Now when visiting the site the device will be using the modified IP address