Previewing Your Website Before DNS Changes (Firstserv Guide)
If you want to test your website before updating your DNS, you can do so by editing your hosts file. This allows your computer to load your domain from your Firstserv server instead of the live site, without affecting other visitors.
How It Works
By editing your hosts file, you map your domain name to your hosting server’s IP address locally on your device.
✅ This lets you:
- Preview your site before going live
- Test changes safely
- Avoid downtime during migrations
Editing the Hosts File (Windows)
Step 1: Locate the Hosts File
The file is located at:
C:\Windows\System32\drivers\etc\hosts
Step 2: Open as Administrator
- Right-click Notepad → select Run as Administrator
- In Notepad, go to File → Open
- Navigate to the path above
- Change file type to All Files to see the hosts file
- Open
hosts
Step 3: Edit the File
Add the following entries at the bottom:
127.0.0.1 localhost
X.X.X.X yourdomain.com
X.X.X.X www.yourdomain.com
Replace:
X.X.X.Xwith your Firstserv server IPyourdomain.comwith your actual domain
Step 4: Save and Test
- Save the file
- Restart your browser (or use an incognito/private window)
✅ Your domain should now load from the Firstserv server.
Editing the Hosts File (macOS)
Step 1: Open Terminal
- Open Terminal via Applications → Utilities or Spotlight
Step 2: Edit the Hosts File
Run:
Enter your password when prompted.
Step 3: Add Your Entries
Add the following:
127.0.0.1 localhost
X.X.X.X yourdomain.com
X.X.X.X www.yourdomain.com
Replace:
X.X.X.Xwith your server IPyourdomain.comwith your domain
Step 4: Save Changes
- Press Ctrl + O → press Enter to save
- Press Ctrl + X to exit
Step 5: Flush DNS Cache (Optional)
To apply changes immediately:
Step 6: Test Your Site
- Open your browser or use a private/incognito window
- Visit your domain
✅ Your site should now load from your Firstserv server.
Important Notes
- This change only affects your device, not the public internet
- Other visitors will still see your existing live site
- Remember to revert/remove entries once testing is complete
Summary
By editing your hosts file, you can:
- Preview your website before DNS changes
- Test migrations safely
- Verify functionality without downtime
If you need help finding your server IP or testing your site before going live, the Firstserv support team is always happy to assist.
