Overview
We allow you to access to your websites through a temporary URL in the http://domain.tld.servername/
format.
However, some sites will not work with a temporary URL. For those sites, you can configure your local system with the server's IP address. To do this, modify your system's /etc/hosts
file to use the destination server's domain name and IP address.
This document explains how to modify your system's /etc/hosts
file.
Modify the hosts file
The following methods allow you to modify your system's /etc/hosts
file.
Important:
Your workstation's Operating System will not remove your changes to the /etc/hosts
file. If you want the domain that you added to use normal DNS, you must manually remove the domain name and IP address in the /etc/hosts
file.
MacOS® and Linux
To modify your /hosts
file if your server runs a MacOS or Linux distribution, perform the following steps:
- Log in to your server as the
root
user via SSH. - Open the
/etc/hosts
file with a text editor. -
Add the destination server's IP address and domain name under the latest entry in the file, for example:
1234127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.20 example.com
1.2.3.4 user.example.com
Note:
In this example,
1.2.3.4
represents the destination server's IP address, anduser.example.com
represents the domain name. -
Save your changes.
-
Reload your web browser for the changes to take effect.
Microsoft® Windows®
Click the tab that corresponds to your version of Microsoft Windows.
To modify the /hosts
file on a Windows 8 or Windows 10 system, perform the following steps:
- On your keyboard, type Win+X on the keyboard, or click the windows (Windows Key) icon in the lower-left corner of your desktop interface to to open the Start menu.
- Enter Notepad in the search text box.
- Right-click Notepad and select Run as Administrator.
-
From the Notepad , open the following file:
C:\Windows\System32\Drivers\etc\hosts
-
Add the destination server's IP address and domain name under the latest entry in the file, for example:
1234127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.20 example.com
1.2.3.4 user.example.com
Note:
In this example,
1.2.3.4
represents the destination server's IP address, anduser.example.com
represents the domain name. - Save your changes.
- Reload your web browser for the changes to take effect.