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
- Get the new server's IP address from your host.
- Edit your computer's
hostsfile (administrator rights required). On Windows it is inC:\Windows\System32\drivers\etc\, on Mac and Linux it is/etc/hosts. - Add a line:
203.0.113.10 yourdomain.com www.yourdomain.com(use the real IP). - Save, clear your browser cache, and open the site.
- Test pages, forms, logins and email sending.
- 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
- How to Move a WordPress Site to a New Host or Domain: Checklist
- Wix Domain Connection Error: Pointing vs Nameservers and Common Fixes
- Website Builder Support Not Resolving Your Problem: Escalation Steps
- Website Builder Renewal Price Jump and Hidden Costs: How to Plan
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.