Editing your hosts file
In your computer's hosts file you set which IP address a domain name points to, for your own computer only. Useful when you migrate a website and want to test it on the new server while other visitors still see the old website.
Enter a domain name, such as yourdomain.nl.
Your server's IP address
You need the IP address of the server your package is on. Your server name is shown in Mijn xYnta with your hosting package; see How can I find the server name of my hosting package?
This value doesn’t fit here. An example: dhs1.
In Command Prompt (Windows) or Terminal (macOS and Linux), type this command and press Enter:
nslookup dhs1.srvnl.nlUse the address with dots (IPv4) below the line with Name, for example 185.117.226.70; not the address of the DNS server at the top of the output. You can also enter dhs1.srvnl.nl in the website check. The examples below use 192.0.2.10; replace it with your server's IP address.
Windows
Open Notepad as administrator
Right-click Notepad and choose Run as administrator.
Open the hosts file
Choose File › Open and go to the folder
C:\Windows\System32\drivers\etc. At the bottom right, set the file type to All Files (*.*) and open the filehosts.Add the line
At the bottom of the file, add a line with the IP address and your domain name, with and without
www.:192.0.2.10 yourdomain.nl www.yourdomain.nlSave the file
Choose File › Save.
macOS and Linux
Open Terminal
On a Mac: click the magnifying glass at the top right, type Terminal and press Enter.
Open the hosts file
Type this command, press Enter and enter your computer's password:
sudo nano /etc/hostsAdd the line
At the bottom of the file, add a line with the IP address and your domain name, with and without
www.:192.0.2.10 yourdomain.nl www.yourdomain.nlSave the file
Press Control + X, then Y and Enter.
Flush the DNS cache (macOS only)
Type this command and press Enter:
sudo dscacheutil -flushcache
Related articles
Thank you for your feedback.

