A domain has just been created or migrated to Plesk. It is known that some time is needed to propagate DNS changes (it can take up to 48 hours), but how can domain content be accessed via Web before it is done?
hosts file allows overriding the DNS for a domain on the particular machine and causes local machine to look directly at the IP address specified.
Add the following line to the
hosts file to get
webmail.example.com resolved to
203.0.113.2 address from the local machine:
CONFIG_TEXT: 203.0.113.2 example.com www.example.com webmail.example.com
After you add the domain information and save the file, the system begins resolving to the specified IP address. After testing is finished, remove these entries.
For Windows 10 and 8:
Press the Windows key and type
Notepadin the search field.
In the search results, right-click Notepad and select Run as administrator.
From Notepad, open the following file:
Make the necessary changes to the file. Click File > Save to save your changes.
For Windows 7 and Vista:
Click Start > All Programs > Accessories. Right-click Notepad and select Run as administrator.
Click Continue on the
Windows needs your permissionUAC window.
When Notepad opens, click File > Open.
In the File name field, type
Make the necessary changes to the file.
Click File > Save to save your changes.
Mac OS X 10.6 through 10.12:
Open Applications > Utilities > Terminal.
hostsfile by typing the following line in the terminal window:
# sudo nano /private/etc/hosts
Type your domain user password when prompted.
Edit the hosts file.
Note: The file contains some comments (lines starting with the # symbol), and some default hostname mappings (for example, 127.0.0.1 – local host). Add your new mappings after the default mappings.
Save the hosts file by pressing
Make changes take effect by flushing the DNS cache with the following command:
# dscacheutil -flushcache
The new mappings should now take effect.