Technically, you don't change the hosts
file inside Plesk — because the hosts
file is a file on your local computer, not on your web server.
But here's what you likely want to do:
hosts
File?The hosts
file is a system file on your local computer that maps domain names to IP addresses. It's useful when:
You're migrating a website to Plesk and want to test it before DNS is updated
You want to preview a domain that’s not live yet
hosts
File on Your ComputerClick Start, search for Notepad
Right-click and choose Run as Administrator
Open this file:
C:\Windows\System32\drivers\etc\hosts
4. Add a line like:
123.123.123.123 yourdomain.com www.yourdomain.com
(Replace 123.123.123.123
with your Plesk server IP)
Save the file. You may need admin rights.
Open Terminal
Run:
sudo nano /etc/hosts
3. Add a line like:
123.123.123.123 yourdomain.com www.yourdomain.com
4. Save (Ctrl+O), then exit (Ctrl+X)
To get the IP address of your Plesk server:
Log in to Plesk
Go to Websites & Domains
Click “Hosting & DNS” > “DNS Settings”
Look for the A
record IP — that’s your server's public IP
After editing the hosts
file, open your browser and go to:
Your computer will load the site from Plesk, even if the live domain points somewhere else.
Just go back and delete or comment out the line you added in the hosts
file.