The hosts file lets your own computer see your website on its new Noiz server while everyone else still sees the old one. You add one line that maps your domain to the new server's IP address, browse the site, fix anything that is wrong, and only then change DNS. Visitors never see a half-finished site, and the move happens without downtime.
Last reviewed: 10 November 2026.
Before you start
203.0.113.10 below stands for it.The hosts file is a plain text file on your computer that lists names and the addresses they should go to. It is checked before DNS, so a line in it overrides what the rest of the internet sees, for you only. It does not change your domain, and nobody else is affected.
sudo nano /etc/hosts
www name if visitors use it:203.0.113.10 yourdomain.com www.yourdomain.com
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
On Linux with systemd, run resolvectl flush-caches. Then quit and reopen your browser.
Walk through the site as a visitor would:
Expect a certificate warning on HTTPS at this stage. A free certificate can only be issued once the domain points at Noiz, so it arrives after the DNS change. Ask us to install one before the switch if you want a warning-free test; we can arrange it as part of a migration. SSL certificate errors and "Not secure" warnings explains the rest.
Use curl, which sends one request to the Noiz server and leaves your computer untouched:
curl -I --resolve yourdomain.com:443:203.0.113.10 https://yourdomain.com/
A 200 or 301 answer means the server responds for your domain. Add -k to ignore the certificate warning while you test. This works on macOS, Linux and any system that has curl.
| Symptom | Fix |
|---|---|
| You still see the old site | The cache was not cleared or the browser was not restarted. Use a private window |
| "Permission denied" when saving | Open the file with sudo, as above |
| The site is broken on the new server | Good: that is what this test is for. Fix it, and test again before DNS changes |
| The new site looks right but visitors still see the old one | DNS has not changed yet. That is the next step |
| The page loads but the images do not | They are loading from the old address. Check the paths and the HTTPS addresses |
Open a ticket in the console and we will check the new site with you.