Guides › Hosting, domain & email › Domain, DNS & SSL

Test Your Website on a New Server Before Changing DNS (hosts File Trick)

Preview the new host with your real domain by pointing your own computer to the new server.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.

The hosts file on your computer overrides DNS for names you list. It lets you see the new server while the world still sees the old one.

Steps

  1. Get the new server's IP address from your host.
  2. Edit your computer's hosts file (administrator rights required). On Windows it is in C:\Windows\System32\drivers\etc\, on Mac and Linux it is /etc/hosts.
  3. Add a line: 203.0.113.10 yourdomain.com www.yourdomain.com (use the real IP).
  4. Save, clear your browser cache, and open the site.
  5. Test pages, forms, logins and email sending.
  6. Remove the line when finished, or you will keep seeing the old preview.

Notes

SSL may show a warning if the certificate is not issued yet. Use only for testing.

Then

Follow our migration checklist and our TTL guide.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-21.